Quellcode durchsuchen

rafthttp: fixes issue 1903

Record the URL being fetched in the log when we 404
Nikhil Sarda vor 11 Jahren
Ursprung
Commit
123b3dd64c
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      rafthttp/sender.go

+ 1 - 1
rafthttp/sender.go

@@ -279,6 +279,6 @@ func (s *sender) post(data []byte) error {
 	case http.StatusNoContent:
 		return nil
 	default:
-		return fmt.Errorf("unhandled status %s", http.StatusText(resp.StatusCode))
+		return fmt.Errorf("unexpected http status %s while posting to %q", http.StatusText(resp.StatusCode), req.URL.String())
 	}
 }