MCPcopy Index your code
hub / github.com/OWASP/Python-Honeypot / error_401

Function error_401

api/server.py:142–154  ·  view source on GitHub ↗

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

(error)

Source from the content-addressed store, hash-verified

140
141@app.errorhandler(401)
142def error_401(error):
143 """
144 handle the 401 HTTP error
145
146 Args:
147 error: the flask error
148
149 Returns:
150 401 JSON error
151 """
152 return jsonify(
153 msg_structure(status="error", msg=error.description)
154 ), 401
155
156
157@app.errorhandler(403)

Callers

nothing calls this directly

Calls 1

msg_structureFunction · 0.90

Tested by

no test coverage detected