status_code_from_error

Function status_code_from_error 

Source
pub fn status_code_from_error(error: &CapturedError) -> StatusCode
Expand description

Convert a CapturedError into an appropriate HTTP status code.

This will attempt to downcast the error to known types and return a corresponding status code. If the error type is unknown, it will default to StatusCode::INTERNAL_SERVER_ERROR.