ring_client/client/api/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug)]
7#[error(transparent)]
8#[non_exhaustive]
9pub enum ApiError {
10 #[error("An error occurred while trying to communicate with the Ring OAuth API")]
12 RequestError(#[from] reqwest::Error),
13
14 #[error("An error occurred while decoding the response from the Ring API: {0}")]
16 InvalidResponse(#[from] serde_json::Error),
17
18 #[error("An error occurred while trying to communicate with the Ring API: {0}")]
20 WebsocketError(#[from] tokio_tungstenite::tungstenite::Error),
21
22 #[error("An error occurred while trying to refresh the authentication tokens")]
24 AuthenticationRefreshFailed(crate::client::authentication::AuthenticationError),
25
26 #[error("An error occurred while sending a message")]
28 SinkAlreadyClosed,
29}