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

Proposal to add error response for not supported method for phone number #138

Open
mhfoo opened this issue Feb 7, 2024 · 7 comments · May be fixed by #145
Open

Proposal to add error response for not supported method for phone number #138

mhfoo opened this issue Feb 7, 2024 · 7 comments · May be fixed by #145
Labels
enhancement New feature or request Spring25

Comments

@mhfoo
Copy link
Collaborator

mhfoo commented Feb 7, 2024

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"

NotSupported:
   description: Not Supported
   content:
    application/json:
     schema:
      $ref: "#/components/schemas/ErrorInfo"
     example:
      status: 501
      code: NOT_SUPPORTED
      message: Service not supported for this phone number

Alternative solution
N.A

Additional context

  • CAMARA APIs may support mobile lines first and then landlines later, vice versa.
  • A MNO may support the CAMARA API method, but the MVNO (of the same MNO) does not support it.
@mhfoo mhfoo added the enhancement New feature or request label Feb 7, 2024
@mhfoo mhfoo changed the title Proposal to add error response for unsupported method for phone number Proposal to add error response for not supported method for phone number Feb 7, 2024
@rartych
Copy link
Collaborator

rartych commented Feb 15, 2024

Similar issue, but not the same is discussed here: #127 .
Is this case covered there?

@mhfoo
Copy link
Collaborator Author

mhfoo commented Feb 19, 2024

Similar issue, but not the same is discussed here: #127 . Is this case covered there?

@rartych
The scenarios in this issue are not covered in #127.

@mhfoo mhfoo linked a pull request Feb 21, 2024 that will close this issue
@mhfoo
Copy link
Collaborator Author

mhfoo commented Feb 21, 2024

@rartych
Added PR #145 for this proposal

@sachinvodafone
Copy link
Collaborator

sachinvodafone commented Mar 4, 2024

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.

@mhfoo
Copy link
Collaborator Author

mhfoo commented Mar 18, 2024

@sachinvodafone:
Please see below.

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. .

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)
If this phone number belongs to an MVNO, the operator may not act on behalf of this MVNO (subject to commercial decisions).
This error code is to handle such scenarios.

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.

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.

@PedroDiez
Copy link
Collaborator

PedroDiez commented Apr 15, 2024

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

@mhfoo
Copy link
Collaborator Author

mhfoo commented Apr 16, 2024

@PedroDiez Commented in the PR #145. Please have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Spring25
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants