def client_error(_): return responses.fail('badRequest')
def not_unique(_): return responses.fail('alreadyExists')
def internal_server_error(_): return responses.fail('internalError', code=500)
def invalid_credentials(_): return responses.fail('invalidCredentials')
def data_error(error): return responses.fail('dataError', additional={ 'required_data': error.required_data, 'optional_data': error.optional_data })
def pagination_error(_): return responses.fail('invalidPage')
def method_not_allowed(_): return responses.fail('methodNotAllowed', code=405)
def page_not_found(_): return responses.fail('notFound', code=404)
def forbidden(_): return responses.fail('forbidden', code=403)
def unauthorized(_): return responses.fail('unauthorized', code=401)