diff --git a/src/requester.rs b/src/requester.rs index ef614f5..5de29a4 100644 --- a/src/requester.rs +++ b/src/requester.rs @@ -11,7 +11,7 @@ impl Requester { where T: DeserializeOwned, { - let body = req.collect().await.unwrap().to_bytes(); + let body = req.collect().await?.to_bytes(); Ok(serde_json::from_slice(&body)?) } }