Example #1
0
 def handle_sqlalchemy_operational_error(error):
     return response(
         cls._internal_server_error_response(
             cls.ERROR_CODE_JSON_DECODE), 500)
Example #2
0
 def ping():
     return response({'message': 'Pong!'})
Example #3
0
 def handle_internal_error(error: InternalServerError):
     return response(
         cls._internal_server_error_response(
             cls.ERROR_CODE_GENERIC_500), 500)
Example #4
0
 def invalid_method(error: InternalServerError):
     return response(cls.RESPONSE_BODY_405, 405)
Example #5
0
 def not_found(error: InternalServerError):
     return response({}, 404)
Example #6
0
 def unauthorized(error: InternalServerError):
     return response(cls.RESPONSE_BODY_401, 401)
Example #7
0
 def bad_request(error: InternalServerError):
     return response(cls.RESPONSE_BODY_400, 400)