mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 21:03:11 -04:00
Refactored register_errorhandlers so that it handles HTTPError
Remove most cases where we catch HTTPError
This commit is contained in:
@@ -22,10 +22,7 @@ def get_service_template_or_404(service_id, template_id):
|
||||
try:
|
||||
return notifications_api_client.get_service_template(service_id, template_id)
|
||||
except HTTPError as e:
|
||||
if e.status_code == 404:
|
||||
abort(404)
|
||||
else:
|
||||
raise e
|
||||
abort(e.status_code)
|
||||
|
||||
|
||||
def delete_service_template(service_id, template_id):
|
||||
|
||||
Reference in New Issue
Block a user