zorkian / go-datadog-api

A Go implementation of the Datadog API.
BSD 3-Clause "New" or "Revised" License
183 stars 156 forks source link

https://app.datadoghq.com/api/v1/validate endpoint returns HTML for non-valid api keys #286

Closed tonglil closed 4 years ago

tonglil commented 5 years ago
$ curl -L -X GET -H 'Content-Type: application/json' -H "DD-API-KEY: invalid" "https://app.datadoghq.com/api/v1/validate"
<html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>

This breaks the library by returning a parsing error invalid character '<' looking for beginning of value instead of false for https://godoc.org/gopkg.in/zorkian/go-datadog-api.v2#Client.Validate.

bkabrda commented 5 years ago

Hey, I think we fixed this in https://github.com/zorkian/go-datadog-api/pull/282 and released that fix in version 2.25.0 - could you give that version a go?

bkabrda commented 4 years ago

Closing as per the above comment. Feel free to reopen if you're still experiencing issues.