Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate limit retry forgets include parameter resulting in 400 Bad Request #510

Open
simonknittel opened this issue Aug 21, 2024 · 1 comment

Comments

@simonknittel
Copy link

Hi!

I've noticed some issue when the contentful-sdk-core library retries a request which errored beforehand because of a rate limit.

During the retry, the include parameter, goes missing resulting in the Contentful API responding with a 400 Bad Request (The query you sent was invalid. One or more required parameters are missing.).

We are trying to do

await environment.getEntryReferences(
  "some_id",
  {
    include: 10,
  },
);

using the https://github.com/contentful/contentful-management.js library. Sometimes it happens, that this request results in a Rate limit. When this request gets retried, the include parameter is suddenly missing.

By some debugging I noticed that here

const { config } = error
the parameter is already missing.

This seems like a bug to me. I expected that the retry uses the same parameters as the original request.

@spzSource
Copy link
Contributor

spzSource commented Sep 5, 2024

I believe this PR #514 should fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants