Module panic_handler

Module panic_handler 

Source
Available on crate feature server only.
Expand description

Collections for some panic handlers

volo::catch_panic::Layer can handle panics in services and when panic occurs, it can respond a Response. This module has some useful handlers for handling panics and returning a response.

Structs§

FixedPayload
Panic handler which can return a fixed payload.

Functions§

always_internal_error
This function is a panic handler and can work with volo::catch_panic::Layer, it will always return 500 Internal Server Error.
fixed_payload
Create a panic handler which can work with volo::catch_panic::Layer. The handler will always return the specified fixed payload as response.