Distinguish between internal errors and network errors.
Open
Nobody has claimed this yet.
priority: medium
TwiDi-InProgress
type: twilio enhancement
- Dominant language
- Ruby
- Stars
- 1.4k
- Forks
- 472
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 5
Description
Issue Summary
Distinguish between internal errors and network errors.
I want to retry calls to Twilio on network errors, but not on internal (actual) errors. The implementation isn't very consistent about what a TwilioError is, and when it should be raised.
Can we please either NOT re-raise Faraday::Error and just let it bubble up, or re-raise these errors as a new Twilio::REST::NetworkError so that consumers can better distinguish between network errors and non-network errors?
Steps to Reproduce
N/A
Code Snippet
N/A
Exception/Log
Twilio::REST::TwilioError: Failed to open TCP connection to conversations.twilio.com:443 (getaddrinfo: Temporary failure in name resolution)
Technical details:
- twilio-ruby version: 6.8.0
- ruby version: irrelevant
Contributor guide
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.
Assessment
This issue has not been assessed yet.