Skip to content

Commit

Permalink
cmd/atlas/internal/cloudapi: wrap decode error
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Aug 13, 2024
1 parent 061937f commit 844eaf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/atlas/internal/cloudapi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (c *Client) post(ctx context.Context, query string, vars, data any) error {
Data: data,
}
if err := json.NewDecoder(res.Body).Decode(&scan); err != nil && !errors.Is(err, io.EOF) {
return err
return fmt.Errorf("decoding response: %w", err)
}
if len(scan.Errors) > 0 {
return scan.Errors
Expand Down

0 comments on commit 844eaf1

Please sign in to comment.