use super::error::BpiError;
impl From<reqwest::Error> for BpiError {
fn from(err: reqwest::Error) -> Self {
BpiError::Transport { source: err }
}
}
impl<T> From<crate::response::ApiEnvelope<T>> for BpiError {
fn from(resp: crate::response::ApiEnvelope<T>) -> Self {
BpiError::from_api_response(resp)
}
}
impl From<serde_json::Error> for BpiError {
fn from(err: serde_json::Error) -> Self {
BpiError::Decode { source: err }
}
}