From ac17682967ad98258cd11b2d5377f411326edcb9 Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Thu, 11 Apr 2024 16:04:49 +0100 Subject: [PATCH] Fixed method mismatch in the reported error --- jsonclient/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonclient/client.go b/jsonclient/client.go index eda9fc7963..7e7cb7279e 100644 --- a/jsonclient/client.go +++ b/jsonclient/client.go @@ -250,7 +250,7 @@ func (c *JSONClient) PostAndParse(ctx context.Context, path string, req, rsp int } if httpRsp.Request.Method != http.MethodPost { // https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections#permanent_redirections - return nil, nil, fmt.Errorf("PUT request to %q was converted to %s request to %q", fullURI, httpRsp.Request.Method, httpRsp.Request.URL) + return nil, nil, fmt.Errorf("POST request to %q was converted to %s request to %q", fullURI, httpRsp.Request.Method, httpRsp.Request.URL) } if httpRsp.StatusCode == http.StatusOK {