Skip to content

Commit

Permalink
custom 404 and 500 error page
Browse files Browse the repository at this point in the history
  • Loading branch information
leonaard committed Jun 9, 2015
1 parent cf82fbd commit 844a942
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions webant/webant.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ def handle_elasticsearch_down(error):
app.logger.error("Error connecting to DB; check your configuration")
return rsp

@app.errorhandler(404)
def not_found(error):
return renderErrorPage(message='Not Found', httpCode=404)

@app.errorhandler(500)
def internal_server_error(error):
return renderErrorPage(message='Internal Server Error', httpCode=500)

return app


Expand Down

0 comments on commit 844a942

Please sign in to comment.