Skip to content

Commit e9ecff8

Browse files
authored
Merge branch 'develop' into test/fast-blocks-epoch3-change
2 parents 56ae168 + aa27bda commit e9ecff8

File tree

13 files changed

+157
-120
lines changed

13 files changed

+157
-120
lines changed

stacks-signer/src/client/stacks_client.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,10 @@ impl StacksClient {
590590
.map_err(|e| backoff::Error::transient(e.into()))?;
591591
let status = response.status();
592592
if status.is_success() {
593-
return response
594-
.json()
595-
.map_err(|e| backoff::Error::permanent(e.into()));
593+
return response.json().map_err(|e| {
594+
warn!("Failed to parse the GetStackers response: {e}");
595+
backoff::Error::permanent(e.into())
596+
});
596597
}
597598
let error_data = response.json::<GetStackersErrorResp>().map_err(|e| {
598599
warn!("Failed to parse the GetStackers error response: {e}");

stackslib/src/net/httpcore.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,15 +1953,16 @@ pub fn send_http_request(
19531953
// Step 5: decode the HTTP message and return it if it's not an error.
19541954
let response_data = match response {
19551955
StacksHttpMessage::Response(response_data) => response_data,
1956-
StacksHttpMessage::Error(path, response) => {
1956+
StacksHttpMessage::Error(_path, response) => {
1957+
let verb = &request.preamble().verb;
1958+
let path = &request.preamble().path_and_query_str;
1959+
let resp_status_code = response.preamble().status_code;
1960+
let resp_body = response.body();
19571961
return Err(io::Error::new(
19581962
io::ErrorKind::Other,
19591963
format!(
1960-
"Request did not succeed ({} != 200). Path: '{}'",
1961-
response.preamble().status_code,
1962-
&path
1963-
)
1964-
.as_str(),
1964+
"HTTP '{verb} {path}' did not succeed ({resp_status_code} != 200). Response body = {resp_body:?}"
1965+
),
19651966
));
19661967
}
19671968
_ => {

0 commit comments

Comments
 (0)