This commit is contained in:
2023-06-02 20:53:05 +02:00
parent 62d1fa25da
commit 320cc93d4d

View File

@@ -27,7 +27,13 @@ where
.await? .await?
.error_for_status()?; .error_for_status()?;
Ok(response.json::<T>().await.unwrap()) match response.json::<T>().await {
Ok(v) => Ok(v),
Err(err) => {
log::error!("Failed serialization: url={:?} err={:?}", url, err);
Err(Box::new(err))
},
}
} }
pub async fn get_book( pub async fn get_book(