-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update error response schema for compliance with Commonalities #20
base: main
Are you sure you want to change the base?
Conversation
Hello @eric-murray Thank you for your proposal. We are reviewing the error codes internally and feedback later. I have a following question.
|
|
I cannot find following description in your provided link.
The phone number is valid for an end user, however API provider cannot use the phone number due to operator's policy. Is my understanding correct? |
The description for
where you need to interpret "identifier" as "phone number" and "device" as "account" for this API. So this is the error returned when the phone number is valid, but is not allocated to any of the API provider's customers or in the pool of numbers which could be allocated to customers. In other words, when the phone number actually belongs to a different network operator. If the phone number is used by the API provider but the service does not apply (e.g. if a fixed line phone number is provided but the service is for mobile numbers only), then the error is |
allOf: | ||
- $ref: "#/components/schemas/ErrorInfo" | ||
- type: object | ||
properties: | ||
status: | ||
enum: | ||
- 404 | ||
code: | ||
enum: | ||
- IDENTIFIER_NOT_FOUND | ||
examples: | ||
GENERIC_404_IDENTIFIER_NOT_FOUND: | ||
description: Provided phone number is not one used by network operator | ||
value: | ||
status: 404 | ||
code: IDENTIFIER_NOT_FOUND | ||
message: Phone number not found. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allOf: | |
- $ref: "#/components/schemas/ErrorInfo" | |
- type: object | |
properties: | |
status: | |
enum: | |
- 404 | |
code: | |
enum: | |
- IDENTIFIER_NOT_FOUND | |
examples: | |
GENERIC_404_IDENTIFIER_NOT_FOUND: | |
description: Provided phone number is not one used by network operator | |
value: | |
status: 404 | |
code: IDENTIFIER_NOT_FOUND | |
message: Phone number not found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
404 IDENTIFIER_NOT_FOUND is not applicable to this API. In this case, the API returns true
in phoneNumChanged
parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not the purpose of this error. The error is used when, due to a routing error, Operator A receives a number recycling request for a MSISDN that is actually used by Operator B. That's a clear error, because Operator A can say nothing about the MSISDN, so they return a 404 IDENTIFIER_NOT_FOUND error. The API consumer then knows they need to ask a different API provider about that MSISDN.
Hello @eric-murray
|
As explained above, some implementations will require this error if an operator receives a query about a MSISDN that is in use by a different operator, and that they therefore know nothing about. The API definition must be general enough to be used by all implementations. |
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
Co-authored-by: Kenichi Yamamoto <[email protected]>
@eric-murray |
What type of PR is this?
What this PR does / why we need it:
This PR:
NOT_FOUND
error code withIDENTIFIER_NOT_FOUND
DEVICE_NOT_APPLICABLE
error code withSERVICE_NOT_APPLICABLE
Which issue(s) this PR fixes:
Fixes # N/A
Special notes for reviewers:
None
Changelog input
Additional documentation
None