We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 326e5bc + 0054045 commit 33b81b2Copy full SHA for 33b81b2
1 file changed
remote-curl.c
@@ -439,8 +439,20 @@ static int run_slot(struct active_request_slot *slot,
439
err = run_one_slot(slot, results);
440
441
if (err != HTTP_OK && err != HTTP_REAUTH) {
442
- error("RPC failed; result=%d, HTTP code = %ld",
443
- results->curl_result, results->http_code);
+ struct strbuf msg = STRBUF_INIT;
+ if (results->http_code && results->http_code != 200)
444
+ strbuf_addf(&msg, "HTTP %ld", results->http_code);
445
+ if (results->curl_result != CURLE_OK) {
446
+ if (msg.len)
447
+ strbuf_addch(&msg, ' ');
448
+ strbuf_addf(&msg, "curl %d", results->curl_result);
449
+ if (curl_errorstr[0]) {
450
451
+ strbuf_addstr(&msg, curl_errorstr);
452
+ }
453
454
+ error("RPC failed; %s", msg.buf);
455
+ strbuf_release(&msg);
456
}
457
458
return err;
0 commit comments