mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-15 09:42:38 -05:00
Added exception handling for 500 error messages.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from flask import jsonify
|
||||
from flask import (jsonify, current_app)
|
||||
|
||||
from app.main import main
|
||||
|
||||
@@ -32,5 +32,5 @@ def limit_exceeded(e):
|
||||
|
||||
@main.app_errorhandler(500)
|
||||
def internal_server_error(e):
|
||||
# TODO: log the error
|
||||
current_app.logger.exception(e)
|
||||
return jsonify(error="Internal error"), 500
|
||||
|
||||
Reference in New Issue
Block a user