Skip to main content

dyn_err

Function dyn_err 

Source
pub fn dyn_err(e: impl RetryableError + 'static) -> ApiError
Expand description

Preserve auth codes before transport errors lose their concrete type.

The error may arrive boxed, and Box<E> implements RetryableError, so a downcast of the outer value alone would miss the code. Check the source chain too: ApiClientError::Auth is #[error(transparent)] over the AuthError.