pub fn collect_error_chain(top: &str, source: Option<&dyn Error>) -> Vec<String>Expand description
Walk the std::error::Error::source() chain and collect every
Display message into a Vec<String>. The first entry is the top-level
error itself; subsequent entries are its causes.
Used by the handler-error path (where Err variants produce 500s) to
surface the full cause chain in dev-mode 500 pages. The panic path uses
a synthetic single-element chain instead (panics aren’t dyn Error).