async_google_apis_common/
error.rs

1#[derive(Debug)]
2pub enum ApiError {
3    /// The API returned a non-OK HTTP response.
4    HTTPResponseError(hyper::StatusCode, String),
5    /// Returned after being redirected more than five times.
6    HTTPTooManyRedirectsError,
7    /// E.g. a redirect was issued without a Location: header.
8    RedirectError(String),
9    /// Invalid data was supplied to the library.
10    InputDataError(String),
11    /// Data for download is available, but the caller hasn't supplied a destination to write to.
12    DataAvailableError(String),
13}
14
15impl std::error::Error for ApiError {}
16impl std::fmt::Display for ApiError {
17    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18        std::fmt::Debug::fmt(self, f)
19    }
20}