fn api_error(e: Error) -> OtaErrorExpand 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.