Skip to content

Access to Rate Limiting error response headers #23

Description

@alexlatchford

I'm trying to respect the Rate Limiting defined in the docs: https://clearbit.com/docs#rate-limiting

Catching the error thrown on a rate_limit call I get:

{"message":"Rate limit exceeded. Limit is 5 concurrent requests.","type":"rate_limit","body":{"error":{"type":"rate_limit","message":"Rate limit exceeded. Limit is 5 concurrent requests."}},"statusCode":400}

There doesn't seem to be any easy access to the response headers here, any chance I could ask you to add this please. I'll just use an exponential backoff (maxing out at 8s) for now but would be great to get access to the Retry-After header in particular to optimise the wait period.

Also looks like either the API is throwing the wrong code or the client lib is transforming it to 400, the docs suggest it should be returning a 429.

Thanks,
Alex

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions