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

Function error_403

nettacker/api/engine.py:84–94  ·  view source on GitHub ↗

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

(error)

Source from the content-addressed store, hash-verified

82
83@app.errorhandler(403)
84def error_403(error):
85 """
86 handle the 403 HTTP error
87
88 Args:
89 error: the flask error
90
91 Returns:
92 403 JSON error
93 """
94 return jsonify(structure(status="error", msg=error.description)), 403
95
96
97@app.errorhandler(404)

Callers

nothing calls this directly

Calls 1

structureFunction · 0.90

Tested by

no test coverage detected