Flask Errors as Nested Dicts
This extension was developed for personal use and changes standard flask and jwt response errors to nested dicts, i. e.
{
"code": 404,
"status": "Not Found"
}
to:
{
"errors": {
"json": {
"url": [
"Does not exist."
]
}
}
}
Installing
Install and update using pip:
$ pip install flask-errors-as-nested-dicts
Usage
from flask import Flask
from flask_jwt_extended import JWTManager
app = Flask(__name__)
jwt = JWTManager(app)
ErrorsAsNestedDicts(app, jwt)