예제 #1
0
def internal_server_error(error):
    app.logger.exception('error 500: %s', error)
    return handler(SysStatus.SYSTEM_ERROR, None, SysStatus.SYSTEM_ERROR.name)
예제 #2
0
def method_not_allowed(error):
    app.logger.exception('error 405: %s', error)
    return handler(SysStatus.FAILURE, None, MessageCategory.METHOD_NOT_ALLOWED)
예제 #3
0
def bad_request(error):
    app.logger.exception('error 400: %s', error)
    return handler(SysStatus.FAILURE, None, MessageCategory.BAD_REQUEST)
예제 #4
0
def not_found(error):
    app.logger.exception('error 404: %s', error)
    return handler(SysStatus.FAILURE, None, MessageCategory.NOT_FONUND)
예제 #5
0
def handle_exception(error):
    return handler(SysStatus.PARAMETER_CHECK_ERROR, None, str(error))