handle the 401 HTTP error Args: error: the flask error Returns: 401 JSON error
(error)
| 140 | |
| 141 | @app.errorhandler(401) |
| 142 | def error_401(error): |
| 143 | """ |
| 144 | handle the 401 HTTP error |
| 145 | |
| 146 | Args: |
| 147 | error: the flask error |
| 148 | |
| 149 | Returns: |
| 150 | 401 JSON error |
| 151 | """ |
| 152 | return jsonify( |
| 153 | msg_structure(status="error", msg=error.description) |
| 154 | ), 401 |
| 155 | |
| 156 | |
| 157 | @app.errorhandler(403) |
nothing calls this directly
no test coverage detected