예제 #1
0
def internal_exception_handler():
    return failure(message='Internal Error.', http_status_code=500)
예제 #2
0
def authorization_exception_handler(e):
    return failure(message=e.message, http_status_code=403)
예제 #3
0
def business_exception_handler(e):
    return failure(status=e.status, message=e.message)
예제 #4
0
def method_not_allowed(error):
    return failure(message=error.description, http_status_code=error.code)
예제 #5
0
def internal_server_error(error):
    return failure(message=error.description, http_status_code=error.code)
예제 #6
0
def not_found(error):
    return failure(message=error.description, http_status_code=error.code)
예제 #7
0
def forbidden(error):
    return failure(message=error.description, http_status_code=error.code)
예제 #8
0
def unauthorized(error):
    return failure(message=error.description, http_status_code=error.code)
예제 #9
0
def bad_request(error):
    return failure(message=error.description, http_status_code=error.code)
예제 #10
0
def exception_handler(e):
    print(e)
    return failure(message='Unknown Error.', http_status_code=500)