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 @@ -452,8 +452,20 @@ static int run_slot(struct active_request_slot *slot,
452
452
err = run_one_slot (slot , results );
453
453
454
454
if (err != HTTP_OK && err != HTTP_REAUTH ) {
455
- error ("RPC failed; result=%d, HTTP code = %ld" ,
456
- results -> curl_result , results -> http_code );
455
+ struct strbuf msg = STRBUF_INIT ;
456
+ if (results -> http_code && results -> http_code != 200 )
457
+ strbuf_addf (& msg , "HTTP %ld" , results -> http_code );
458
+ if (results -> curl_result != CURLE_OK ) {
459
+ if (msg .len )
460
+ strbuf_addch (& msg , ' ' );
461
+ strbuf_addf (& msg , "curl %d" , results -> curl_result );
462
+ if (curl_errorstr [0 ]) {
463
+ strbuf_addch (& msg , ' ' );
464
+ strbuf_addstr (& msg , curl_errorstr );
465
+ }
466
+ }
467
+ error ("RPC failed; %s" , msg .buf );
468
+ strbuf_release (& msg );
457
469
}
458
470
459
471
return err ;
You can’t perform that action at this time.
0 commit comments