Refactored register_errorhandlers so that it handles HTTPError

Remove most cases where we catch HTTPError
This commit is contained in:
Rebecca Law
2016-03-10 11:53:29 +00:00
parent 2acc496734
commit f6d98b63ea
14 changed files with 110 additions and 247 deletions

View File

@@ -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):