-
Notifications
You must be signed in to change notification settings - Fork 28
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
Proposal to add error response for not supported method for phone number #138
Comments
Similar issue, but not the same is discussed here: #127 . |
Camara guidelines use the regular expression ^+?[0-9]{5,15}$ to validate phone numbers across all APIs. This validation simply checks for a valid phone number format and doesn't distinguish between mobile and landline numbers.The Camara guidelines don't mandate providers to implement mobile/landline differentiation on the server side. . In this scenario, if no resources are associated with the validated phone number, the API server should respond with a 204 (No Content) status code.This code indicates successful processing but no data to return, rather than a 501 (Not Implemented) code, which suggests the service is unavailable. |
@sachinvodafone:
Operators are not required to implement both mobile lines and landlines of the same CAMARA API. Agree that the phone number format does not state whether it is a mobile land or landline (only peer operators of the home operator may know the type of phone number, based on prefix or number range)
In your example above, the phone number is valid and the route to the home operator can be found. The home operator may or may not implement this API function. Example: in the first phase, only mobile lines for call forwarding, and landlines will be a later phase. 501 (Not Supported), with the error message: "Service not supported for this phone number" means the client did not request with any invalid inputs. It is a server-side error, and this API response will not be charged. There is nothing the client can do, to obtain a correct response for this phone number. 204 (No Content), means a successful API call and this API response will be charged to the API consumer, since it is in the 2XX range. 501 (Not Implemented) does not mean unavailable. 503 (Service Unavailable) means unavailable and the client may try at a later time. |
This issue has not the same scope as per Issue#127, but a scenario that should be aligned with decision taken as per Issue#127 - Scenario 5. So far, a specific "code" is agreed, so as analogous one would be needed for this case, and "status" points to be agreed as 422. Some comments indicated in PR based on this comment |
@PedroDiez Commented in the PR #145. Please have a look. |
Problem description
CAMARA APIs may not support all phone numbers for specific functions in any point in time
Possible evolution
Add a 501 status response with the following message "Service not supported for this phone number"
Alternative solution
N.A
Additional context
The text was updated successfully, but these errors were encountered: