api_error

Function api_error 

Source
fn api_error(e: Error) -> OtaError
Expand description

Maps a failed reqwest response to the appropriate OtaError.

A 401 Unauthorized response means the saved token has been revoked or expired — the caller should re-authenticate via device flow rather than treating this as a generic API error.