Skip to main content

map_error_to_canonical

Function map_error_to_canonical 

Source
pub fn map_error_to_canonical(error: &dyn Any) -> CanonicalError
Expand description

Centralized downcast-based error mapping.

Converts known framework and gear error types into CanonicalError. The descriptive detail for Internal-category mappings flows into the canonical’s ctx.description (recoverable via diagnostic()) so the canonical_error_middleware can log it server-side without leaking onto the wire (detail stays opaque per DESIGN.md §3.6).