def internal_server_error(error): app.logger.exception('error 500: %s', error) return handler(SysStatus.SYSTEM_ERROR, None, SysStatus.SYSTEM_ERROR.name)
def method_not_allowed(error): app.logger.exception('error 405: %s', error) return handler(SysStatus.FAILURE, None, MessageCategory.METHOD_NOT_ALLOWED)
def bad_request(error): app.logger.exception('error 400: %s', error) return handler(SysStatus.FAILURE, None, MessageCategory.BAD_REQUEST)
def not_found(error): app.logger.exception('error 404: %s', error) return handler(SysStatus.FAILURE, None, MessageCategory.NOT_FONUND)
def handle_exception(error): return handler(SysStatus.PARAMETER_CHECK_ERROR, None, str(error))