handle the 403 HTTP error Args: error: the flask error Returns: 403 JSON error
(error)
| 156 | |
| 157 | @app.errorhandler(403) |
| 158 | def error_403(error): |
| 159 | """ |
| 160 | handle the 403 HTTP error |
| 161 | |
| 162 | Args: |
| 163 | error: the flask error |
| 164 | |
| 165 | Returns: |
| 166 | 403 JSON error |
| 167 | """ |
| 168 | return jsonify( |
| 169 | msg_structure(status="error", msg=error.description) |
| 170 | ), 403 |
| 171 | |
| 172 | |
| 173 | @app.errorhandler(404) |
nothing calls this directly
no test coverage detected