Errors
The error object of the IoT API and the codes that say what went wrong.
On this page
An error is an HTTP status and a JSON object whose code never changes its meaning.
The error object
| Field | Meaning |
|---|---|
code | A stable code for the cause. Act on this. |
message | A sentence to read in your logs. It can change, so do not show it to the people who use your software and do not match on it. |
fields | On a 400, each field that is wrong and why. Absent otherwise. |
requestId | The identifier of this request. Quote it when you ask us for help. |
Every answer, an error or not, carries the header X-RDC-Request-Id with the same value as requestId.
Codes every product shares
| Status | Code | Meaning | Retry |
|---|---|---|---|
400 | invalid_request | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | No. Fix the request. |
401 | unauthorized | The token is missing, expired or not ours. | After you get a new token. |
403 | forbidden | The token does not give access to this company or operation. | No. |
404 | <thing>_not_found | The record does not exist for this company. | No. |
409 | revision_conflict | expectedRevision is older than the record. | Read the record again, then send a new operation. |
409 | operation_reused | This operationId was sent before with another body. | No. |
422 | A code of the product, such as blocked_by_checks | The request is well formed and a rule of the product refuses it. | No. The code says what to change. |
429 | rate_limited | Too many requests. Retry-After gives the seconds. | Yes, after the pause. |
503 | unavailable | The service cannot answer now. | Yes, with the same operationId. |
Codes of IoT
| Status | Code | Meaning |
|---|---|---|
422 | INVALID_TRANSITION | Read the record and choose an action allowed in its state. |
422 | ALERT_RESOLVED | A resolved alert cannot be changed. |
422 | ALREADY_ACKNOWLEDGED | The alert is already acknowledged; read its current state. |
422 | ASSIGNEE_REQUIRED | Assign the alert before creating the work order. |
422 | ACKNOWLEDGEMENT_REQUIRED | Acknowledge the alert before resolving it. |
422 | WORK_ORDER_EXISTS | Read and use the existing linked work order. |
422 | WORK_ORDER_REQUIRED | The ERP confirmation must contain the work-order identifier. |
422 | UPDATE_NOT_READY | Only a ready update can start. |
422 | UPDATE_NOT_RUNNING | This action requires a running update. |
422 | UPDATE_NOT_PAUSED | Resume only a stopped or failed update. |
422 | STALE_STAGE | The result belongs to a different stage; read the current stage. |
422 | INVALID_STAGE_RESULT | Stage successes and failures must equal the stage cohort size. |
422 | ALREADY_OFFLINE | The gateway uplink is already disconnected. |
422 | ALREADY_ONLINE | The gateway uplink is already connected. |
422 | UPLINK_OFFLINE | Reconnect before delivering queued readings. |
422 | BUFFER_EMPTY | There is no queued reading to deliver. |
422 | OUT_OF_ORDER | Deliver the oldest queued reading first. |
422 | DUPLICATE_READING | Keep the first recorded reading; do not apply the duplicate. |
422 | STALE_READING | Use a source sequence greater than the last accepted sequence. |
422 | INVALID_READING | Check the identifier, value, quality and source timestamp. |
422 | BUFFER_FULL | Preserve the queue and restore delivery before accepting more readings. |
422 | EXTERNAL_ID_EXISTS | Find the device with that externalId instead of creating it again. |
422 | RULE_INVALID | Check tag, unit, operator, threshold and duration. |
422 | UPDATE_INVALID | Select a non-empty compatible device cohort and an approved firmware. |
422 | EVENT_NOT_PARKED | Replay applies only to a parked delivery. |
The full rule: Developer guide