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

Distinguish between internal errors and network errors. #689

Open
hovissimo opened this issue Oct 27, 2023 · 0 comments
Open

Distinguish between internal errors and network errors. #689

hovissimo opened this issue Oct 27, 2023 · 0 comments

Comments

@hovissimo
Copy link

hovissimo commented Oct 27, 2023

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.

https://github.com/search?q=repo%3Atwilio%2Ftwilio-ruby%20Twilio%3A%3AREST%3A%3ATwilioError&type=code
image

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
@hovissimo hovissimo changed the title Distinguish between service errors and network errors. Distinguish between internal errors and network errors. Oct 27, 2023
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