Skip to main content

vetted_proxy_error_label

Function vetted_proxy_error_label 

Source
pub fn vetted_proxy_error_label(body: &str) -> Option<&'static str>
Expand description

Classify an untrusted proxied error body onto a vetted static label.

Parses body as JSON and reads, in order, error.type, error.code, then top-level type / code (each must be a JSON string). Returns OUR constant only on an exact match; the untrusted value itself is never surfaced. Non-JSON, oversized-truncated, or unrecognised bodies yield None — classification never fails loudly.