mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-18 21:48:49 -04:00
Now that we have discovered that the catch all Exception handler doesn't work, I've created a custom exception (SendNotificationQueueError) that handles this case and an error handler for it.
Talked these through with @becca as an approach.
This commit is contained in:
@@ -242,10 +242,7 @@ def send_notification(notification_type):
|
||||
notification_type=notification_type,
|
||||
api_key_id=api_user.id,
|
||||
key_type=api_user.key_type)
|
||||
try:
|
||||
send_notification_to_queue(saved_notification, service.research_mode)
|
||||
except Exception as e:
|
||||
return jsonify(result='error', message="Internal server error"), 500
|
||||
send_notification_to_queue(saved_notification, service.research_mode)
|
||||
|
||||
notification_id = create_uuid() if saved_notification is None else saved_notification.id
|
||||
notification.update({"template_version": template.version})
|
||||
|
||||
Reference in New Issue
Block a user