Verified Commit 101a7cf9 authored by Filip Hron's avatar Filip Hron
Browse files

rebase + is_user_logged()

parent 3abf133a
Pipeline #87539 passed with stage
in 20 minutes and 10 seconds
......@@ -112,7 +112,11 @@ def create_app(config):
def _wrap_error(error, code):
if isinstance(error, dict):
return dict({'status': code}, **error)
return {'status': code, 'error': 'Error:{!r}'.format(error)}, code
return {
'status': code,
'error': 'Error:{!r}'.format(error),
'logged': is_user_logged()
}, code
def not_found_error(error):
......@@ -120,12 +124,11 @@ def not_found_error(error):
def internal_error(error):
# return render_template('errors/500.html', error=error), 500
# return _wrap_error(dir(error.original_exception.__traceback__), 500)
return {
'error': 'Error: {!r}'.format(error),
'extra': 'Original Error: {!r}'.format(error.original_exception),
'status': 500
'status': 500,
'logged': is_user_logged()
}, 500
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment