Skip to content

Commit

Permalink
small fixes according review
Browse files Browse the repository at this point in the history
  • Loading branch information
tino097 committed Jun 13, 2018
1 parent 9b7b521 commit 3ad4ddd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckan/config/middleware/flask_app.py
Expand Up @@ -410,9 +410,10 @@ def error_handler(e):
if isinstance(e, HTTPException):
extra_vars = {u'code': [e.code], u'content': e.description}
return base.render(u'error_document_template.html', extra_vars), e.code
extra_vars = {u'code': 500, u'content': e.message}
extra_vars = {u'code': [500], u'content': u'Internal server error'}
return base.render(u'error_document_template.html', extra_vars), 500

for code in default_exceptions:
app.register_error_handler(code, error_handler)
app.register_error_handler(Exception, error_handler)
if not app.debug:
app.register_error_handler(Exception, error_handler)

0 comments on commit 3ad4ddd

Please sign in to comment.