MCPcopy Create free account
hub / github.com/pallets/flask / handle_500

Function handle_500

tests/test_user_error_handler.py:30–36  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

28
29 @app.errorhandler(500)
30 def handle_500(e):
31 assert isinstance(e, InternalServerError)
32
33 if e.original_exception is not None:
34 return f"wrapped {type(e.original_exception).__name__}"
35
36 return "direct"
37
38 with pytest.raises(ValueError) as exc_info:
39 app.register_error_handler(999, None)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected