Box<dyn Error>::from(format!("...")) instead of a typed error.
Quickest path: just stringify whatever, return as error.
The error becomes opaque text. Callers can't pattern-match, can't retry by category, can't attach structured logs. Every observability layer downstream loses signal.
Define an enum with variants for each failure mode. Implement From for upstream
error types so ? propagates cleanly; preserve the chain via #[source].
Canonical alternative
error-handling/error-composition