Open
Description
Description
- Ticket is understood, and QA has been contacted (if the ticket has a QA label).
- This work is added to the sprint review slide deck (key win bullet point and demo slide)
notifications_utils/recipients.py :: validate_phone_number
The phone number validation is throwing a TypeError when a vanity phone number is used (i.e. 1-800-DIG-SAFE).
This is causing POST v2/notifications/sms returns a 500 Internal Server Error instead of a 400 Bad Request Error: Not a valid number.
Although the normalized form of the vanity number is technically valid this format should probably be flagged as an invalid format.
Steps to Reproduce
- POST {{notification-api-url}}/v2/notifications/sms with a payload using a vanity number for the phone number
Impact/Urgency
Making a POST request to send an sms notification with a vanity number will result in a 500 Internal Server Error
Expected Behavior
- A validation error is returned with a 400 status code
Activity