fix(pdk): return error when no response is available (#694)

This commit is contained in:
zach
2024-03-11 10:32:31 -07:00
committed by GitHub
parent 5f62554aa1
commit d32d4a3dd7

View File

@@ -236,11 +236,12 @@ pub(crate) fn http_request(
Some(res.into_reader())
}
Err(e) => {
let msg = e.to_string();
if let Some(res) = e.into_response() {
data.http_status = res.status();
Some(res.into_reader())
} else {
None
return Err(Error::msg(msg));
}
}
};