Enum dim_extern_api::Error
source · pub enum Error {
Timeout,
ReachedMaxTries,
DeserializationError {
body: Arc<str>,
error: String,
},
NoResults {
query: String,
year: Option<i32>,
},
NoSeasonsFound {
id: u64,
},
NoEpisodesFound {
id: u64,
season: u64,
},
NoGenreFound {
id: u64,
},
OtherError(Arc<dyn Error + Send + Sync + 'static>),
RemoteApiError {
code: u16,
message: String,
},
}
Variants§
Timeout
The request timeouted
ReachedMaxTries
Max retry count reached
DeserializationError
The API response could not be deserialized: {error}
NoResults
No results are found: query={query} year={year:?}
NoSeasonsFound
No seasons found for the id supplied: {id}
NoEpisodesFound
No episodes found for the id supplied: id={id} season={season}
NoGenreFound
Could not find genre with supplied id: {id}
OtherError(Arc<dyn Error + Send + Sync + 'static>)
Other error, usually contains an error that shouldn’t happen unless theres a bug.
RemoteApiError
The remote API returned an error ({code}): {message}
Implementations§
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()