Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
warittornc committed Feb 21, 2024
1 parent 35c9bfe commit 4dfda9f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bothan-coin-gecko/src/api/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@ pub enum Error {
#[error("failed to parse")]
Parse,
}

impl From<reqwest::Error> for Error {
fn from(e: reqwest::Error) -> Self {
Error::Reqwest(e.to_string())
}
}

impl From<reqwest::header::InvalidHeaderValue> for Error {
fn from(e: reqwest::header::InvalidHeaderValue) -> Self {
Error::InvalidHeaderValue(e.to_string())
}
}

0 comments on commit 4dfda9f

Please sign in to comment.