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

Show errors when SMS can't be sent #136

Open
Swimburger opened this issue Jun 14, 2022 · 1 comment
Open

Show errors when SMS can't be sent #136

Swimburger opened this issue Jun 14, 2022 · 1 comment

Comments

@Swimburger
Copy link

I'm testing the Dev Phone from a trial account. Do to trial account restrictions, the Dev Phone can't send SMS to phone numbers that aren't in the Verified Caller ID list. That's how it should be, but the Dev Phone shows the SMS as sent in the UI while logging an error in the console.

Console output:

SMS API threw an error TwilioCliError: Error code 21608 from Twilio: The number  is unverified. Trial accounts cannot send messages to unverified numbers; verify  at twilio.com/user/account/phone-numbers/verified, or purchase a Twilio number to send messages to unverified numbers.. See https://www.twilio.com/docs/errors/21608 for more info.
    at CliRequestClient.request (/Users/nswimberghe/.twilio-cli/node_modules/@twilio/cli-core/src/services/cli-http-client.js:113:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  exitCode: 21608,
  data: {
    code: 21608,
    message: 'The number  is unverified. Trial accounts cannot send messages to unverified numbers; verify  at twilio.com/user/account/phone-numbers/verified, or purchase a Twilio number to send messages to unverified numbers.',
    more_info: 'https://www.twilio.com/docs/errors/21608',
    status: 400
  }
}

UI screenshot:
Screen Shot 2022-06-14 at 12 07 37 PM

I suggest we should show the SMS as failed to send in the UI and if possible, show reason why, or refer to the console output.

@ayyrickay
Copy link
Collaborator

Good call. This was very optimistic design, and it needs to handle the error cases better.

Some things that need to happen:

  1. Backend function to send SMS needs to send the relevant response details to the front end.
  2. Frontend needs to update the message based on this response - we should update the Redux store with the correct error state on the correct message
  3. Frontend needs design for an error state that handles this appropriately
  4. This may not be totally true, but I think the best place for detailed output will be in the CLI logs. This gets complicated if we do things like Option to deploy the devphone to Functions & Assets #143 or threaded messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants