Skip to content

Commit

Permalink
Try propagating more Error<Response> context in the message
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Nov 29, 2024
1 parent 8c64541 commit 21f37b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ use thiserror::Error;
use crate::responses;

#[derive(Error, Debug)]
pub enum Error<Respone> {
pub enum Error<Response> {
#[error("encountered an error when performing an HTTP request")]
RequestError(#[from] reqwest::Error),
#[error("API responded with a client error: status code of {0}")]
ClientErrorResponse(StatusCode, Respone),
#[error("API responded with a client error: status code of {0}: {1}")]
ClientErrorResponse(StatusCode, Response),
#[error("API responded with a server error: status code of {0}")]
ServerErrorResponse(StatusCode, Respone),
ServerErrorResponse(StatusCode, Response),
#[error("Health check failed")]
HealthCheckFailed(responses::HealthCheckFailureDetails),
#[error("Could not find the requested resource")]
Expand Down

0 comments on commit 21f37b9

Please sign in to comment.