예제 #1
0
def create_error_handlers(blueprint):
    """Create error handlers on blueprint."""
    blueprint.errorhandler(CirculationException)(
        create_api_errorhandler(
            status=HTTP_CODES["bad_request"], message="Invalid loan action"
        )
    )
    records_rest_error_handlers(blueprint)
예제 #2
0
파일: rest.py 프로젝트: weko3-dev35/weko
def create_error_handlers(blueprint):
    """Create error handlers on blueprint."""
    blueprint.errorhandler(PIDInvalidAction)(create_api_errorhandler(
        status=403, message='Invalid action'))
    records_rest_error_handlers(blueprint)
예제 #3
0
def create_error_handlers(blueprint):
    """Create error handlers on blueprint."""
    blueprint.errorhandler(PIDInvalidAction)(create_api_errorhandler(
        status=403, message='Invalid action'
    ))
    records_rest_error_handlers(blueprint)
예제 #4
0
def create_error_handlers(blueprint):
    """Create error handlers on blueprint."""
    records_rest_error_handlers(blueprint)
예제 #5
0
def create_error_handlers(blueprint):
    """Create error handlers on blueprint."""
    blueprint.errorhandler(LoanActionError)(create_api_errorhandler(
        status=HTTP_CODES['method_not_allowed'], message='Invalid loan action'
    ))
    records_rest_error_handlers(blueprint)