retries for network errors (e.g. ECONNRESET)
sometimes Twilio calls fail for intermittent network/server errors (e.g. ECONNRESET); can the Auto-Retry with Exponential Backoff be updated or a similar option added to also retry under these conditions?
https://github.com/twilio/twilio-node/blob/55db7c2c5f2b56110333a03c4f4c6f02432489bd/src/base/RequestClient.ts#L37-L66
@tiwarishubham635 Can you please relate to this one? 🙏 We started to get multiple ECONNABORTED errors and this addition can help a lot.
We have recently made these changes. I think this will help in your case. This will be available in the coming release
@tiwarishubham635 I might be missing something, but I can't see how this change can help here... It gives the option to change the timeout value, but it doesn't allow to override the retry configuration.
@tiwarishubham635 Would it be ok if we'll open a PR with the change recommended in this issue?
Sure, I'll be happy to review it
@tiwarishubham635 I'm having second thoughts about this and you might be able to assist. In some cases when we get the ECONNABORTED error (due to timeout), the request did manage to get to Twilio and the SMS is sent. If we will introduce this retry mechanism, it means that the same request MIGHT be sent twice to Twilio API. I assume that your side supports idempotency, but I wanted to validate this before starting.
Yes, we do support Idempotency
@manisha1997 has a change been made to support retries for network errors (e.g. ECONNRESET)? last I checked twilio-node only retries 429 errors.
Apologies!
👋 Hi @mfulton26, thanks for reporting this issue!
Our Agent TwiDI has started analyzing and prioritizing this request.
Here’s what will happen next:
- A PR will be created to address this issue.
- The PR will be reviewed by our team members.
- On approval, the PR will be merged into the main branch.
- Once merged, the issue will be closed automatically and changes will be available in the next release.
⏳ Sit tight — we’ll keep you updated as we make progress.