Skip to content

Commit

Permalink
update data
Browse files Browse the repository at this point in the history
  • Loading branch information
tony11306 committed Feb 19, 2024
1 parent ca35957 commit 3027fad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions SchoolSystemModel/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from flask.helpers import make_response
from flask import abort
from werkzeug.exceptions import BadRequest, ExpectationFailed, InternalServerError, Unauthorized

import logging

def exception_decorator(func):
def wrapper(*args, **kwargs):
Expand All @@ -16,7 +16,7 @@ def wrapper(*args, **kwargs):
except BadRequest:
abort(400, {'result': 'server can not understand the request.'})
except Exception as err:
print(err)
logging.error(err)
abort(500, {'result': 'unexpected error. It could be school system is under maintaining, or that page is unable to access currently.'})

return wrapper

0 comments on commit 3027fad

Please sign in to comment.