Skip to main content

error_mapping_middleware

Function error_mapping_middleware 

Source
pub async fn error_mapping_middleware(request: Request, next: Next) -> Response
Expand description

Middleware function that provides centralized error mapping

This middleware can be applied to routes to automatically extract request context and provide it to error handlers. The actual error conversion happens in the IntoProblem trait implementations and map_error_to_problem function.