Skip to content

Commit

Permalink
Fixed method mismatch in the reported error
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutchinson committed Apr 11, 2024
1 parent d899ffa commit ac17682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsonclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ac17682

Please sign in to comment.