-
Notifications
You must be signed in to change notification settings - Fork 60
Schemas in error responses #151
Comments
- `status` is now an integer - `code` values aligned with Commonalities (INVALID_ARGUMENT, UNAUTHENTICATED, PERMISSION_DENIED...) - Specific schemas defined for all errors, so `ErrorInfo` schema is not used. I have created a new issue in Commonalities to decide whether to reference specific model per error or the common model: <camaraproject/WorkingGroups#151>. When a common approach is decided we should align this to it.
If it is not too late, perhaps we could also explore RFC 7807 to define Error Info as |
My preference is option 1 (common In my experience, it is rare for a client to implement any sort of logic to automatically recover from errors, other than to try again with the same request (for any timeout or not available error), or to refresh the OAuth token if that has expired. Otherwise, the operation fails and the error gets logged. And then somebody may investigate if it keeps happening. |
Common model errors defined and consensuated in CAMARA API Guidelines, are focused on make the same error logic in all APIs implementations in all Telcos involved. ErrorInfo Schema is defined to be enriched by the specific error types. Totally Agree with @jlurien |
My preference is for approach 1 |
My preference is also for approach 1. |
Approach 1 is more simple, my preference |
Changes applied on PR #162 |
As we got an agreement on this issue (refer to common ErrorInfo model), I proceed to close it. Thanks to all for your valuable feedback. |
As agreed in the discussion in Commonalities (camaraproject/WorkingGroups#151), we should adopt the new agreement to refer to the common ErrorInfo schema for every error.
In the different WGs we have 2 approaches to specify the schema for error responses:
ErrorInfo
model:In the second case there is a strict specification that for certain error response the
status
andcode
values must be the one in theenum
, while in the first case, we are relying on examples and external doc to guide implementations.On the other hand, the first approach is more simple and it may ease the code generation as schema model is reused.
It would be convenient to define a global guideline son all APIs follow the same approach.
The text was updated successfully, but these errors were encountered: