MCPcopy Create free account
hub / github.com/OWASP/Python-Honeypot / error_400

Function error_400

api/server.py:126–138  ·  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

124
125@app.errorhandler(400)
126def error_400(error):
127 """
128 handle the 400 HTTP error
129
130 Args:
131 error: the flask error
132
133 Returns:
134 400 JSON error
135 """
136 return jsonify(
137 msg_structure(status="error", msg=error.description)
138 ), 400
139
140
141@app.errorhandler(401)

Callers

nothing calls this directly

Calls 1

msg_structureFunction · 0.90

Tested by

no test coverage detected