DataDog / datadog-api-client-typescript

Typescript client for the Datadog API

Home Page:http://datadoghq.dev/datadog-api-client-typescript/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

APIException HTTP-code: 429

MenouerBetty opened this issue · comments

Describe the bug
Sometimes when querying the metric API I get this 429 exception error.

To Reproduce
Hard to reproduce as this is inconsistent but basically trying to query a specific metric will sometimes ( often ) result in this error.

Expected behavior
To not run into this error

Screenshots
https://imgur.com/a/sbisC90

Environment and Versions (please complete the following information):
A clear and precise description of your setup:
Package version:
"@datadog/datadog-api-client": "^1.3.0",

Additional context
Query:


    apiInstance
      .queryMetrics(params)
      .then((data: v1.MetricsQueryResponse) => {
     return data
      })
      .catch((error) => console.error(error));

Hi,

429 means rate limited: you have a certain number of calls, this is documented here: https://docs.datadoghq.com/api/latest/rate-limits/. Thanks.