File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -439,8 +439,20 @@ static int run_slot(struct active_request_slot *slot,
439
439
err = run_one_slot (slot , results );
440
440
441
441
if (err != HTTP_OK && err != HTTP_REAUTH ) {
442
- error ("RPC failed; result=%d, HTTP code = %ld" ,
443
- results -> curl_result , results -> http_code );
442
+ struct strbuf msg = STRBUF_INIT ;
443
+ 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
+ strbuf_addch (& msg , ' ' );
451
+ strbuf_addstr (& msg , curl_errorstr );
452
+ }
453
+ }
454
+ error ("RPC failed; %s" , msg .buf );
455
+ strbuf_release (& msg );
444
456
}
445
457
446
458
return err ;
You can’t perform that action at this time.
0 commit comments