mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Remove documentation pages
These are out of date now and potentially misleading. Adds a new error page for HTTP `410 GONE`. Looks like the 404 page, but returns the appropriate error code to be a good web citizen.
This commit is contained in:
@@ -384,10 +384,14 @@ def register_errorhandlers(application):
|
||||
error.message
|
||||
))
|
||||
error_code = error.status_code
|
||||
if error_code not in [401, 404, 403, 500]:
|
||||
if error_code not in [401, 404, 403, 410, 500]:
|
||||
error_code = 500
|
||||
return _error_response(error_code)
|
||||
|
||||
@application.errorhandler(410)
|
||||
def handle_gone(error):
|
||||
return _error_response(410)
|
||||
|
||||
@application.errorhandler(404)
|
||||
def handle_not_found(error):
|
||||
return _error_response(404)
|
||||
|
||||
Reference in New Issue
Block a user