handle the 400 HTTP error Args: error: the flask error Returns: 400 JSON error
(error)
| 54 | |
| 55 | @app.errorhandler(400) |
| 56 | def error_400(error): |
| 57 | """ |
| 58 | handle the 400 HTTP error |
| 59 | |
| 60 | Args: |
| 61 | error: the flask error |
| 62 | |
| 63 | Returns: |
| 64 | 400 JSON error |
| 65 | """ |
| 66 | return jsonify(structure(status="error", msg=error.description)), 400 |
| 67 | |
| 68 | |
| 69 | @app.errorhandler(401) |
nothing calls this directly
no test coverage detected