You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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-callingsourceNodes
multiple times, the request eventually fails with the following error:Upon further investigation I found out that the axios request inside
getJobsForDepartment
fails and throws a429 Too Many Requests
error, which in turn leads toprocess.exit(1)
in the catch clause insidesourceNodes
, 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.
The text was updated successfully, but these errors were encountered: