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

Function error_401

nettacker/api/engine.py:70–80  ·  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

68
69@app.errorhandler(401)
70def error_401(error):
71 """
72 handle the 401 HTTP error
73
74 Args:
75 error: the flask error
76
77 Returns:
78 401 JSON error
79 """
80 return jsonify(structure(status="error", msg=error.description)), 401
81
82
83@app.errorhandler(403)

Callers

nothing calls this directly

Calls 1

structureFunction · 0.90

Tested by

no test coverage detected