Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
reForis
reForis
Commits
101a7cf9
Verified
Commit
101a7cf9
authored
Aug 30, 2021
by
Filip Hron
Browse files
rebase + is_user_logged()
parent
3abf133a
Pipeline
#87539
passed with stage
in 20 minutes and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
reforis/__init__.py
View file @
101a7cf9
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment