Skip to content

Error responses: remove OUT_OF_RANGE, clarify 404, and use the common error responses and examples #29

Open

Description

@hdamker

Problem description

The error responses in device-authenticity.yaml are all defined locally, with inline examples. Some of them do not fit the API:

  • 400BadRequest allows OUT_OF_RANGE, and the error list in info.description documents it. The API has no range-restricted fields: the only input is imei, with a fixed pattern.
  • 404NotFound returns IDENTIFIER_NOT_FOUND for "IMEI not found in any accessible database". However, info.description defines that an IMEI not present on any list results in status unknown. It is unclear when a 404 is returned instead of a 200 response with unknown.
  • None of the error examples reference the shared examples in CAMARA_common.yaml. All of them are defined inline.

Expected behavior

Following the CAMARA API Design Guide section 3.2, an error response either references a common error response, or is defined locally with exactly the codes the API returns and with examples referenced from components/examples of CAMARA_common.yaml:

Local response Codes Proposal
400BadRequest INVALID_ARGUMENT, OUT_OF_RANGE remove OUT_OF_RANGE, then reference BadRequest400
401Unauthorized UNAUTHENTICATED reference Unauthenticated401
403Forbidden PERMISSION_DENIED reference PermissionDenied403
404NotFound IDENTIFIER_NOT_FOUND clarify whether 404 is needed (see above); if yes, reference IdentifierNotFound404
422UnprocessableContent SERVICE_NOT_APPLICABLE keep local, reference the example GENERIC_422_SERVICE_NOT_APPLICABLE
429TooManyRequests QUOTA_EXCEEDED, TOO_MANY_REQUESTS keep local (TooManyRequests429 has only TOO_MANY_REQUESTS), reference the examples GENERIC_429_QUOTA_EXCEEDED and GENERIC_429_TOO_MANY_REQUESTS

Update the error list in info.description and the test definitions accordingly.

Additional context

Activity

  1. added
    bugSomething isn't working
    and removed
    bugSomething isn't working
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions