Skip to main content

fatal_message

Function fatal_message 

Source
pub fn fatal_message(err: &BackendError) -> String
Expand description

Render err as a single-line fatal: diagnostic helper binaries write to stderr.

The Azure wording substitutes “container” for “bucket”. The wording lives in BackendError’s Display derive — see the type-level doc comment.

Variants like BackendError::InvalidCredentials and BackendError::Network inline their immediate source via {source}/{0} in the format string, sometimes transitively when the source itself wraps another typed error. The chain-walk is done by [super::append_source_chain], which dedups any level whose Display text is already at the tail of msg — so the fatal: line surfaces deeper root causes (e.g. the io / DNS error nested inside the SDK dispatch failure) without producing the duplicated “network error: network error: …” rendering that a naive walk would.