Fix whitespace
This commit is contained in:
parent
792e782968
commit
f2a4b976b9
2 changed files with 7 additions and 2 deletions
|
|
@ -106,7 +106,7 @@ app, labthing = create_app(
|
|||
cors: CORS = CORS(app)
|
||||
|
||||
# Enable correct handling of Marshmallow/Webargs validation errors
|
||||
# Return validation errors as JSON
|
||||
# Return validation errors as JSON
|
||||
# (see https://webargs.readthedocs.io/en/latest/framework_support.html)
|
||||
@app.errorhandler(422)
|
||||
@app.errorhandler(400)
|
||||
|
|
@ -118,6 +118,7 @@ def handle_error(err):
|
|||
else:
|
||||
return jsonify({"errors": messages}), err.code
|
||||
|
||||
|
||||
# Use custom JSON encoder
|
||||
labthing.json_encoder = JSONEncoder
|
||||
app.json_encoder = JSONEncoder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue