1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use hyper::StatusCode;
use thiserror::Error;
#[derive(Error, Debug, Clone)]
#[error("Failed to while caching HTTP resource")]
pub struct HttpCacheError;
#[derive(Error, Debug, Clone)]
pub enum HyperClientError {
#[error("Failed to fetch HTTP resource")]
FailedToFetch,
#[error("Unexpected HTTP status code {0}")]
BadHttpResponse(StatusCode),
#[error("Failed to deserialize resource")]
FailedToDeserialize,
}