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

Better handle "Verification delivery attempt blocked" and "Geo Permission configuration is not permitting call" exceptions from Twilio #2065

Closed

Conversation

joeyorlando
Copy link
Contributor

What this PR does

When we receive a code 60410 from Twilio, return HTTP 403, instead of HTTP 500.

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • CHANGELOG.md updated (or pr:no changelog PR label added if not required)

@joeyorlando joeyorlando added the pr:no public docs Added to a PR that does not require public documentation updates label May 31, 2023
@joeyorlando joeyorlando changed the title Better handle "Verification delivery attempt blocked" exceptions from Twilio Better handle "Verification delivery attempt blocked" and "Geo Permission configuration is not permitting call" exceptions from Twilio May 31, 2023
@Konstantinov-Innokentii
Copy link
Member

Konstantinov-Innokentii commented Jun 1, 2023

Work continued in #2074. See details in PR description

Konstantinov-Innokentii added a commit that referenced this pull request Jun 8, 2023
# What this PR does
Introduces BaseFailed exception for phone_notificator.

# Why
We need to somehow distinguish errors we want to be notified - like
network errors or invalid twilio credentials (I will call them "real"
errors) and errors we want to share with user, but don't want to be
paged ( I will call them "fake" errors).
To do that I added "graceful_msg" to all Failed... exceptions. If
details field is present - it mean we can return 400 code with the
message, if not - 500 code. So, "real" errors will raise Failed...
exception, while "fake" will add "graceful_msg".

# TODO
handle exceptions handled here
#2065
## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
@joeyorlando joeyorlando deleted the jorlando/handle-twilio-number-blocked-exception branch June 9, 2023 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants