We return a 500 http status when posting a non-unique inbound-number and flood the logs (~100 lines just for this one error)
[ ] Ticket is understood, and QA has been contacted (if the ticket has a QA label).
On the POST routes for /inbound-number, when passing a payload that includes a non-unique number, the service returns a 500 Internal Server Error, when we actually know what the problem is and should return a 400 status and a relevant error message indicting that the number is not unique.
Routes:
CREATE POST /inbound-number
UPDATE POST /inbound-number/:inbound-number-id
Steps to Reproduce
Using POST /inbound-numberto create a new inbound-number in Postman, populate the number property with an existing number.
Observe the 500 Internal Server Error response
Using POST /inbound-number/:inbound_number-idto update an existing inbound-number in Postman, populate the number property with an existing number.
Observe the 500 Internal Server Error response
Logs will show the stacetrace errors. Here are a few examples.
Workaround
Is there something we can do to work around this issue in the meantime?
None. We just have to remember this is a possible issue when troubleshooting.
Impact/Urgency
Low - internal facing experience which causes confusion
Expected Behavior
When I POST to create or update an inbound number
And I use a number that already exists on that service
Then I should receive a 400 Bad Request response and an error message detailing what went wrong and the typical amount of logging for an error like this.
Possible example:
{
"errors": [
{
"error": "ValidationError",
"message": "number +15125551212 is not unique"
}
],
"status_code": 400
}
QA Considerations
For QA to populate. Leave blank if QA is not applicable on this ticket.
[ ] add tests to regression that exercise this route expecting the appropriate http status and validation error message
Description
We return a 500 http status when posting a non-unique inbound-number and flood the logs (~100 lines just for this one error)
On the POST routes for
/inbound-number
, when passing a payload that includes a non-uniquenumber
, the service returns a 500 Internal Server Error, when we actually know what the problem is and should return a 400 status and a relevant error message indicting that the number is not unique.Routes:
/inbound-number
/inbound-number/:inbound-number-id
Steps to Reproduce
/inbound-number
to create a new inbound-number in Postman, populate thenumber
property with an existing number./inbound-number/:inbound_number-id
to update an existing inbound-number in Postman, populate thenumber
property with an existing number.Logs will show the stacetrace errors. Here are a few examples.
Workaround
Is there something we can do to work around this issue in the meantime? None. We just have to remember this is a possible issue when troubleshooting.
Impact/Urgency
Low - internal facing experience which causes confusion
Expected Behavior
When I POST to create or update an inbound number And I use a number that already exists on that service Then I should receive a 400 Bad Request response and an error message detailing what went wrong and the typical amount of logging for an error like this.
Possible example:
QA Considerations
For QA to populate. Leave blank if QA is not applicable on this ticket.
Additional Info & Resources