Skip to main content

error_chain

Function error_chain 

Source
pub fn error_chain(err: &dyn Error) -> String
Expand description

Format a reqwest (or any std::error::Error) chain into a single string that includes the root cause, e.g.: “error sending request for url (…): dns error: failed to lookup address …”

Plain e.to_string() only shows the outermost message. This walks .source() so callers see why the request failed.