예제 #1
0
 def error_internal_error(e):
     return fjsonify({'message': 'Internal server error', 'code': 500}), 500
예제 #2
0
 def error_conflict(e):
     return fjsonify({'message': 'Conflict', 'code': 409}), 409
예제 #3
0
 def error_not_implemented(e):
     return fjsonify({
         'message': 'This feature is for now Not Implemented',
         'code': 501
     }), 501
예제 #4
0
 def error_forbidden(e):
     return fjsonify({
         'message': 'You are not authorized to access this',
         'code': 403
     }), 403
예제 #5
0
 def error_not_found():
     return fjsonify({
         'message': 'Resource has not been found',
         'code': 404
     }), 404
예제 #6
0
 def error_not_authenticated(e):
     return fjsonify({
         'message': 'You are not authorized to access this',
         'code': 401
     }), 401
예제 #7
0
 def error_bad_Request(e):
     return fjsonify({'message': 'Bad Request', 'code': 400}), 400
예제 #8
0
 def page_not_found(e):
     return fjsonify({'message': 'Not Found', 'code': 404}), 404
예제 #9
0
 def page_forbidden(e):
     return fjsonify({'message': 'Forbidden', 'code': 403}), 403
예제 #10
0
 def page_unauthorized(e):
     return fjsonify({'message': 'Unauthorized', 'code': 401}), 401