`http` Is it possible to add "Error 429 handling"?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24
- Forks
- 41
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 12
Description
Hi, I was trying to handle "429 Too Many Requests" error with retries inspired by this blog here.
By using the token bucket algorithm (the RateLimiter could also be imported from available public node module, but I do not know how to import in an OpenFn Job Expression and whether it is possible), I managed to create this expression to POST with retries if necessary. Also, because the header x-ratelimit-reset is non-compliant, I exported NODE_OPTIONS=--insecure-http-parser.
But I think it is not okay to duplicate those "Error 429 handling" for other API calls with possible "429" errors.
So I think, it could be made more generic and be part of the language-http, or maybe a variant of language-http like language-http-plus-unnecessary-work-because-of-429
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the language-http adaptor and the linked send-wa-message-anc-visit-reminder.js expression to understand the existing 429 retry handling. Determine whether generic retry support can be provided by language-http, including the non-compliant x-ratelimit-reset header concern, and consider the work complete when callers no longer need to duplicate this handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100