Skip to content

Commit 4f804ce

Browse files
authored
Merge pull request #5165 from stacks-network/fix/resubmit-block-commit
chore: avoid warning from duplicate block-commit
2 parents 0146ba2 + 95b01c1 commit 4f804ce

File tree

12 files changed

+153
-117
lines changed

12 files changed

+153
-117
lines changed

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)