Skip to main content

Module error_layer

Module error_layer 

Source
Expand description

Centralized error mapping for Axum

This module provides utilities for automatically converting all framework and module errors into consistent RFC 9457 Problem+JSON responses, eliminating per-route boilerplate.

Traits§

IntoProblem
Helper trait for converting errors to Problem responses with context

Functions§

error_mapping_middleware
Middleware function that provides centralized error mapping
extract_trace_id
Extract trace ID from headers or generate one
map_error_to_problem
Centralized error mapping function