diff options
Diffstat (limited to 'crates/shirabe/src/util/http/curl_response.rs')
| -rw-r--r-- | crates/shirabe/src/util/http/curl_response.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/http/curl_response.rs b/crates/shirabe/src/util/http/curl_response.rs index 3c4f923..c6f5d77 100644 --- a/crates/shirabe/src/util/http/curl_response.rs +++ b/crates/shirabe/src/util/http/curl_response.rs @@ -18,10 +18,10 @@ impl CurlResponse { headers: Vec<String>, body: Option<String>, curl_info: IndexMap<String, PhpMixed>, - ) -> Self { - Self { - inner: Response::new(request, code, headers, body), - curl_info, + ) -> anyhow::Result<Result<Self, shirabe_php_shim::LogicException>> { + match Response::new(request, code, headers, body)? { + Ok(inner) => Ok(Ok(Self { inner, curl_info })), + Err(e) => Ok(Err(e)), } } |
