MCPcopy Index your code
hub / github.com/OWASP/Nettacker / error_404

Function error_404

nettacker/api/engine.py:98–108  ·  view source on GitHub ↗

handle the 404 HTTP error Args: error: the flask error Returns: 404 JSON error

(error)

Source from the content-addressed store, hash-verified

96
97@app.errorhandler(404)
98def 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

Callers

nothing calls this directly

Calls 2

structureFunction · 0.90
_Function · 0.50

Tested by

no test coverage detected