pub fn humanize_brain_error(
err: &BrainError,
provider_label: &str,
model: &str,
) -> StringExpand description
Translate a BrainError into a French human-readable message.
The provider_label is the display name of the provider (e.g. “Anthropic”,
“NVIDIA NIM”). The model is the model name that was requested when the
error occurred (empty string when unknown).
§Example
ⓘ
let err = BrainError::ServerError { status: 401, body: String::new() };
let msg = errors::humanize_brain_error(&err, "Anthropic", "claude-sonnet-4-6");
println!("{}", msg);