Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #4349 from tino097/4303-error-document-template-fix
Browse files Browse the repository at this point in the history
[#4303] Update error handler
  • Loading branch information
amercader committed Jul 19, 2018
2 parents f6caf33 + e8bc721 commit 6583b45
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/config/middleware/flask_app.py
Expand Up @@ -415,6 +415,9 @@ def _register_error_handler(app):
def error_handler(e):
if isinstance(e, HTTPException):
extra_vars = {u'code': [e.code], u'content': e.description}
# TODO: Remove
g.code = [e.code]

return base.render(
u'error_document_template.html', extra_vars), e.code
extra_vars = {u'code': [500], u'content': u'Internal server error'}
Expand Down

0 comments on commit 6583b45

Please sign in to comment.