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

Plugin fails frequently due to 'HTTP 429 Too many requests'. #28

Open
rodikh opened this issue Jun 14, 2021 · 0 comments
Open

Plugin fails frequently due to 'HTTP 429 Too many requests'. #28

rodikh opened this issue Jun 14, 2021 · 0 comments

Comments

@rodikh
Copy link

rodikh commented Jun 14, 2021

When making a lot of API calls to /v1/jobs, due to having many departments for example, or due to other plugins having many content updates and re-calling sourceNodes multiple times, the request eventually fails with the following error:

Failed to fetch jobs for department.

Upon further investigation I found out that the axios request inside getJobsForDepartment fails and throws a 429 Too Many Requests error, which in turn leads to process.exit(1) in the catch clause inside sourceNodes, which crashes the entire project.

My suggestion is to add a retry mechanism on failed requests, and add a backoff delay in the case of an HTTP 429 error.

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

1 participant