rust_api_kit/http/anyhow_integration.rs
1use super::client::{Response, integration::log_error};
2
3impl<T, E, U> From<anyhow::Error> for Response<T, E, U>
4where
5 U: From<anyhow::Error>,
6{
7 fn from(value: anyhow::Error) -> Self {
8 log_error(format!("Unexpected error: {:?}", value));
9
10 Response::UnexpectedError(value.into())
11 }
12}