forked from ScoDoc/ScoDoc
API: most App exceptions now return json error message
This commit is contained in:
parent
504599ea66
commit
6fc89b88ef
@ -4,11 +4,13 @@
|
||||
from flask import Blueprint
|
||||
from flask import request
|
||||
from app.scodoc import sco_utils as scu
|
||||
from app.scodoc.sco_exceptions import ScoException
|
||||
|
||||
api_bp = Blueprint("api", __name__)
|
||||
api_web_bp = Blueprint("apiweb", __name__)
|
||||
|
||||
|
||||
@api_bp.errorhandler(ScoException)
|
||||
@api_bp.errorhandler(404)
|
||||
def api_error_handler(e):
|
||||
"erreurs API => json"
|
||||
|
Loading…
Reference in New Issue
Block a user