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

Twilio crashed nodejs on errors 'Uncaught Exception' #983

Open
wasims1 opened this issue Nov 14, 2023 · 6 comments
Open

Twilio crashed nodejs on errors 'Uncaught Exception' #983

wasims1 opened this issue Nov 14, 2023 · 6 comments
Labels
type: twilio enhancement feature request on Twilio's roadmap

Comments

@wasims1
Copy link

wasims1 commented Nov 14, 2023

Issue Summary

For some design thinking beyond my understanding, someone decided to throw 'Uncaught exception' when twilio encounters an error. This is causing Nodejs apps to shutdown (and restart) when that happens which is quite impractical in production. This issue is well documented however i see no resolution so far. Here are some of the tickets and discussion about it:

#949
https://stackoverflow.com/questions/54175579/how-to-handle-twilio-errors-that-crash-nodejs

Steps to Reproduce

  1. Run nodejs with twilio
  2. Make a call that will produce an error such as: /Conversations/undefined/Participants
  3. Your nodejs will crash and have to restart

Is there any timeline for fixing this terrible issue?

@bradleyy1012
Copy link

Yea this happens with a variety of specific api calls. Whoever designed the backend architecture for twilio should probably stop coding.

@tiwarishubham635
Copy link
Contributor

Hi! One such issue was resolved by #952. Is there some other case where you are facing uncaught exceptions? Please share the code samples to help us reproduce the error. Thanks!

@tiwarishubham635 tiwarishubham635 added the status: waiting for feedback waiting for feedback from the submitter label Apr 15, 2024
@NishikantS578
Copy link

NishikantS578 commented May 3, 2024

"RestException [Error]: Invalid 'To' Phone Number" this error is also uncaught exceptions.

@tiwarishubham635
Copy link
Contributor

Hi @NishikantS578! Can you please share your code snippet? Thanks!

@NishikantS578
Copy link

NishikantS578 commented May 3, 2024

    client.messages.create({
        body: message,
        from: phone,
        to: "9234789238",
    })

Since the 'to' field does not have a valid phone number ( The phone number should include country code as well), twilio throws uncaught exception in response to that.

RestException [Error]: Invalid 'To' Phone Number:

It would be better if it did not threw uncaught exception, since that crashes server.

@tiwarishubham635
Copy link
Contributor

tiwarishubham635 commented May 6, 2024

Ohh got it. We need to catch these exceptions. I have added this to our internal backlog to be prioritized. +1s/reactions on this issue (and comments) and PRs will bump it higher up the backlog.

@tiwarishubham635 tiwarishubham635 added type: twilio enhancement feature request on Twilio's roadmap and removed status: waiting for feedback waiting for feedback from the submitter labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: twilio enhancement feature request on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

4 participants