-
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
Enhancements and Alignments in Errors #321
Comments
I don't like the proposal to maintain a parallel set of error codes dependent on whether the API used In all cases, the This is more than semantics. Having a parallel set of error codes complicates implementation logic for what is the same logical error, as the error to be returned is dependent solely on the options offered to identify the API subject. And I think application developers will also get confused if they are working with several APIs, as they end up implementing parallel but identical error traps for the "device" and "phone number" error codes. Why, for example, should the error codes be different for:
and
I think it would be better if we could just agree on a common term that applies to both the "device" and the "subscription" (or "account" or whatever), both of which just identify the API subject. Given that application developers will have to get familiar with 3-legged tokens, and given that the ID token refers to device or subscription as the "subject", irrespective of how it was identified, I'd propose the term "API_SUBJECT" to replace both "DEVICE" and "PHONE_NUMBER". So we could have (note that some of these are likely to become redundant shortly): In all cases, the exact error can be clarified in the |
After reviewing this with @PedroDiez, we think that certain standard HTTP codes would not need to be documented explicitly for every API operation. In particular those 4xx codes returned when the client sends something not specified as accepted by the API, as that is the standard expected behaviour:
5xx errors are unexpected errors and quite standard as well, so we may discuss also whether they need to be explicitly indicated. Regarding distinguishing error codes for device vs phoneNumber. there is a good point in @eric-murray's comment, but the term "API_SUBJECT" I don't think is friendly enough. We suggest to simplify the codes removing the references to "device" as generally the term "identifier" is enough in this context, and we also have the
If we decide to change the codes from Fall24 meta, for Spring25 one, that would imply a compatibility breaking change to released APIs. Probably, we should not release a new version just to adopt the new codes, but if a new version is released to include additional functionality, then the new codes must be adopted. |
@jlurien |
@jlurien |
Thanks @eric-murray @patrice-conil, Regarding the inclusion or not of 500, 503 and 504, what is your preference? |
@jlurien |
NOTE: This proposal has to be in line with #324 |
I can update that PR if these changes are agreed first. All that would change would be the error codes. |
There are two parts Eric in this issue. It is fine to unify the second one within #324 with error codes are agreed. The proposal is the one commented by Jose. An I can generate PR for the first part (Add within section 6.1 Standardized use of CAMARA error responses the following information:...., based on the agreement reached here) |
@PedroDiez @eric-murray |
@jlurien As @eric-murray I prefer to not include 50X errors in the YAML. |
I think that regarding errors with regards to identifiers we can align on #324, adding the new ones (Indeed Eric already covered some of them) UNSUPPORTED_API_SUBJECT_IDENTIFIER -> UNSUPPORTED_IDENTIFIER Within #316 enhance the proposal with the pending errors (so I take the part of updating CAMARA_Common.yaml) And associated with this issue enhance the section 6.1 also from my side cc @rartych, @eric-murray WDYT? |
Remove error code 415 request: camaraproject#321 (comment)
@jlurien @PedroDiez regarding this point, does it mean also that we have not to provide test definition against these codes? There is one test for OTP API against 415 for example. |
Hi Ludovic,
|
Thanks @PedroDiez |
Problem description
Two enhancements are proposed inder this issue:
phoneNumber
concept in the same fashion as done fordevice
in MetaRelease Fall 24 for device error responsesPossible evolution
6.1 Standardized use of CAMARA error responses
the following information:Mandatory Errors to be documented in CAMARA API Spec YAML are the following:
phoneNumber
conceptAdd a new section
6.3 Error Responses - phoneNumber
to detail error scenarios for phoneNumberNOTE: New exceptions would be added to
CAMARA_common.yaml
for referenceAlternative solution
Additional context
There are CAMARA APIs where phoneNumber represents the end's user subscription (e.g SIM-SWAP, Number Verification, Carrier Billing, KYC family,...). Therefore having specific errors related to the concept of phoneNumber is the natural way to address error scenarios in a fully semantic and user-friendly way
Proposed as a child issue of #306
The text was updated successfully, but these errors were encountered: