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

fix: Standardize errors to track with Commonalities #29

Closed
4 tasks
caubut-charter opened this issue Oct 18, 2024 · 0 comments · Fixed by #30
Closed
4 tasks

fix: Standardize errors to track with Commonalities #29

caubut-charter opened this issue Oct 18, 2024 · 0 comments · Fixed by #30
Assignees
Labels
bug Something isn't working

Comments

@caubut-charter
Copy link
Contributor

Problem description
Breaking down #19 as being too large for a single PR. This PR focuses just on error messages.

Expected behavior
These need to be reviewed as the correct error type:

  • NetworkNotRemovable400 - For devices that MUST have a single network (e.g. consumer grade APs).
  • DefaultDeviceNotSupported403 - For situations where the default device cannot be inferred.
  • 501 - A large portion of the API doesn't need to be implemented for the simplest use case. The added scope for B2B2* scenarios added many new endpoints and added additional functionality to existing endpoints.
  • Fix any examples and anchors to be appropriate for any given endpoint.

Alternative solution
N/A. Requirement.

Additional context

Error codes also in this pass: https://github.com/camaraproject/Commonalities/blob/main/documentation/API-design-guidelines.md#61-standardized-use-of-camara-error-responses

For this you can copy/paste from https://github.com/camaraproject/Commonalities/blob/main/artifacts/CAMARA_common.yaml

In addition you might want to consider which operation are "allowed" to return a 501 (NOT_IMPLEMENTED). There was a TSC discussion about camaraproject/Commonalities#246 with the result that "Mandatory endpoints must not have 501 defined as a valid response". Currently you have defined 501 as a potential response for all operations, but I don't think you want to indicate that the implementation of all these endpoints is "optional".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant