handle the 401 HTTP error Args: error: the flask error Returns: 401 JSON error
(error)
| 68 | |
| 69 | @app.errorhandler(401) |
| 70 | def error_401(error): |
| 71 | """ |
| 72 | handle the 401 HTTP error |
| 73 | |
| 74 | Args: |
| 75 | error: the flask error |
| 76 | |
| 77 | Returns: |
| 78 | 401 JSON error |
| 79 | """ |
| 80 | return jsonify(structure(status="error", msg=error.description)), 401 |
| 81 | |
| 82 | |
| 83 | @app.errorhandler(403) |
nothing calls this directly
no test coverage detected