Fix the response codes for errors.

This commit is contained in:
yackob03 2014-01-30 19:06:10 -05:00
parent 1af43735d0
commit fff5da6354
3 changed files with 0 additions and 50 deletions

View file

@ -55,30 +55,6 @@ def csrf_protect():
req_user)
@api.errorhandler(404)
def endpoint_not_found(e):
return jsonify({
'error_code': 404,
'message': 'Resource not found'
})
@api.errorhandler(403)
def endpoint_forbidden(e):
return jsonify({
'error_code': 403,
'message': 'Permission Denied'
})
@api.errorhandler(400)
def endpoint_invalid_request(e):
return jsonify({
'error_code': 400,
'message': 'Invalid Request'
})
def request_error(exception=None, **kwargs):
data = kwargs.copy()
if exception: