handle the 400 HTTP error Args: error: the flask error Returns: 400 JSON error
(error)
| 124 | |
| 125 | @app.errorhandler(400) |
| 126 | def error_400(error): |
| 127 | """ |
| 128 | handle the 400 HTTP error |
| 129 | |
| 130 | Args: |
| 131 | error: the flask error |
| 132 | |
| 133 | Returns: |
| 134 | 400 JSON error |
| 135 | """ |
| 136 | return jsonify( |
| 137 | msg_structure(status="error", msg=error.description) |
| 138 | ), 400 |
| 139 | |
| 140 | |
| 141 | @app.errorhandler(401) |
nothing calls this directly
no test coverage detected