Skip to content

Commit

Permalink
Improve error message and README example (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixge authored Jun 14, 2024
1 parent 2945a87 commit 709611d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can learn more about this feature in our [official documentation](https://do
3. Run `datadog-pgo` before your build step. E.g. for a service `foo` that runs in `prod` and has its main package in `./cmd/foo`, you should add this step:

```
go run github.com/DataDog/datadog-pgo@latest 'service:foo env:prod' ./cmd/foo/default.pgo
go run github.com/DataDog/datadog-pgo@latest "service:foo env:prod" ./cmd/foo/default.pgo
```

That's it. The go toolchain will automatically pick up any `default.pgo` file in the main package, so there is no need to modify your `go build` step.
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (c *Client) post(ctx context.Context, path string, payload any) ([]byte, er
}

if res.StatusCode < 200 || res.StatusCode >= 300 {
return nil, fmt.Errorf("POST %s: %s: please check that your DD_API_KEY, DD_APP_KEY and DD_SITE env vars are set correctly", path, res.Status)
return nil, fmt.Errorf("%s: please check that your DD_API_KEY, DD_APP_KEY and DD_SITE env vars are set correctly and that your account has profiles matching your query", res.Status)
}
return resBody, nil
}
Expand Down

0 comments on commit 709611d

Please sign in to comment.