handle the 404 HTTP error Args: error: the flask error Returns: 404 JSON error
(error)
| 96 | |
| 97 | @app.errorhandler(404) |
| 98 | def error_404(error): |
| 99 | """ |
| 100 | handle the 404 HTTP error |
| 101 | |
| 102 | Args: |
| 103 | error: the flask error |
| 104 | |
| 105 | Returns: |
| 106 | 404 JSON error |
| 107 | """ |
| 108 | return jsonify(structure(status="error", msg=_("not_found"))), 404 |
| 109 | |
| 110 | |
| 111 | @app.before_request |