Skip to content

Commit

Permalink
Merge pull request #256 from rartych/rartych-patch-err-422
Browse files Browse the repository at this point in the history
Add 422 UNIDENTIFIABLE_DEVICE error in API-design-guidelines.md table
  • Loading branch information
shilpa-padgaonkar authored Aug 2, 2024
2 parents 7408799 + fa74f2a commit 73c194a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions artifacts/CAMARA_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ components:
status: 422
code: DEVICE_NOT_APPLICABLE
message: The service is not available for the provided device.
GENERIC_422_UNIDENTIFIABLE_DEVICE:
description: The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token
value:
status: 422
code: UNIDENTIFIABLE_DEVICE
message: The device cannot be identified.
GENERIC_422_{{SPECIFIC_CODE}}:
description: Any semantic condition associated to business logic, specifically related to a field or data structure
value:
Expand Down
5 changes: 5 additions & 0 deletions documentation/API-design-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ Common errors are captured in the table below.
| 409 | The 409 (Conflict) status code indicates when a request conflicts with the current state of the server. |
| 410 | The 410 (Gone) status code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. |
| 415 | The 415 (Unsupported Media Type) status code indicates that the server cannot accept the format of the request body as indicated by the `Content-Type` or `Content-Encoding` request header. The API specification will state what request body format should be used. |
| 422 | The 422 (Unprocessable Entity) status code means the server understands the content type of the request body, and the syntax of the request body is correct but it was unable to process the contained instructions. |
| 429 | The 429 (Too Many Requests) status code indicates that the server is temporarily unable to accept any more requests from the client due to the high number of requests recently sent. A `Retry-After` response header may indicate how long the client should wait before trying again. |
| 500 | Status code 500 (Internal Server Error) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.<br>This code must always be documented. It should be used as a general system error. |
| 501 | Status code 501 (Not Implemented) indicates that the requested method is not supported by the server and cannot be handled. The only methods that servers require support (and therefore should not return this code) are `GET` and HEAD. |
Expand Down Expand Up @@ -756,6 +757,7 @@ In the following, we elaborate on the existing client errors. In particular, we
| 404 | `{{SPECIFIC_CODE}}` | `{{SPECIFIC_CODE_MESSAGE}}` | Specific situation to highlight the resource/concept not found (e.g. use in device) |
| 422 | `DEVICE_IDENTIFIERS_MISMATCH` | Provided device identifiers are not consistent. | Inconsistency between device identifiers not pointing to the same device |
| 422 | `DEVICE_NOT_APPLICABLE` | The service is not available for the provided device. | Service is not available for the provided device |
| 422 | `UNIDENTIFIABLE_DEVICE` | The device cannot be identified. | The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token |
| 422 | `{{SPECIFIC_CODE}}` | `{{SPECIFIC_CODE_MESSAGE}}` | Any semantic condition associated to business logic, specifically related to a field or data structure |
| 429 | `QUOTA_EXCEEDED` | Either out of resource quota or reaching rate limiting. | Request is rejected due to exceeding a business quota limit |
| 429 | `TOO_MANY_REQUESTS` | Either out of resource quota or reaching rate limiting. | API Server request limit is overpassed |
Expand Down Expand Up @@ -793,6 +795,9 @@ The Following table compiles the guidelines to be adopted:
| 3 | Device identifiers mismatch | 422 | DEVICE_IDENTIFIERS_MISMATCH | Provided device identifiers are not consistent. |
| 4 | Invalid access token context | 403 | INVALID_TOKEN_CONTEXT | Device identifiers are not consistent with access token. |
| 5 | Service not applicable to the device | 422 | DEVICE_NOT_APPLICABLE | The service is not available for the provided device. |
| 6 | The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | 422 | UNIDENTIFIABLE_DEVICE | The device cannot be identified. |



#### Templates

Expand Down

0 comments on commit 73c194a

Please sign in to comment.