示例#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