Skip to main content

classify_error

Function classify_error 

Source
pub fn classify_error(
    error_name: &str,
    status_code: Option<u16>,
) -> BTreeMap<String, String>
Expand description

Classify an error by exception name and/or HTTP status code.

Returns a map with both Python-compatible short keys (error_type, error_code, error_name) and spec-aligned keys (error.type, error.category, error.severity, http.status_code) matching the Python reference.