MCPcopy
hub / github.com/OWASP/Nettacker / error_400

Function error_400

nettacker/api/engine.py:56–66  ·  view source on GitHub ↗

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

(error)

Source from the content-addressed store, hash-verified

54
55@app.errorhandler(400)
56def error_400(error):
57 """
58 handle the 400 HTTP error
59
60 Args:
61 error: the flask error
62
63 Returns:
64 400 JSON error
65 """
66 return jsonify(structure(status="error", msg=error.description)), 400
67
68
69@app.errorhandler(401)

Callers

nothing calls this directly

Calls 1

structureFunction · 0.90

Tested by

no test coverage detected