Skip to main content

odata_error_to_problem

Function odata_error_to_problem 

Source
pub fn odata_error_to_problem(
    err: &Error,
    instance: &str,
    trace_id: Option<String>,
) -> Problem
Expand description

Returns a fully contextualized Problem for OData errors.

This function maps all modkit_odata::Error variants to appropriate system error codes from the framework catalog. The instance parameter should be the request path.

§Arguments

  • err - The OData error to convert
  • instance - The request path (e.g., “/api/user-management/v1/users”)
  • trace_id - Optional trace ID (uses current span if None)