Expand description
A middleware to catch and log panics.
Structsยง
- Catch
Panic Endpoint - An endpoint for the
CatchPanicMiddlewaremiddleware. - Catch
Panic Middleware - A middleware for catching and logging panics transforming them to the 500 error
response. The panic will not crash the service, but it becomes not live after
exceeding the
Settings::service_live_counter_threshold()value. That should cause Kubernetes to restart the service.
Constantsยง
Functionsยง
- panic_
response ๐ - Converts a panic to a response.
- set_
panic_ ๐hook - Sets a custom panic hook to capture the Backtrace and Panic Location for logging purposes. This hook gets called BEFORE we catch it. So the thread local variables stored here are valid when processing the panic capture.