mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Wire up error handlers.
Replace some 400s with more appropriate 500s. DAO methods that cause unexpected exceptions get caught and logged by errors.py 500 error handler.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
from flask import Blueprint
|
||||
from flask import (jsonify)
|
||||
from flask import (
|
||||
Blueprint,
|
||||
jsonify
|
||||
)
|
||||
|
||||
from sqlalchemy.exc import DataError
|
||||
from sqlalchemy.orm.exc import NoResultFound
|
||||
|
||||
@@ -8,6 +11,9 @@ from app.schemas import (template_schema, templates_schema)
|
||||
|
||||
template = Blueprint('template', __name__)
|
||||
|
||||
from app.errors import register_errors
|
||||
register_errors(template)
|
||||
|
||||
|
||||
# I am going to keep these for admin like operations
|
||||
# Permissions should restrict who can access this endpoint
|
||||
|
||||
Reference in New Issue
Block a user