Skip to main content
Every error has the same shape and a stable code. Branch on the code, not the message.

Response shape

Successful responses use the same wrapper, with data in place of error.

Where errors appear

Errors reach you in two places:
  • The HTTP response. Validation, authentication, and capability errors are returned immediately, before anything is sent to the device.
  • The action. Once a command is accepted (202), it can still fail at the device. The action’s state becomes failed and errorCode holds the code. You’ll see it on GET /actions/{id} and in the push.failed webhook.
A failed action carries errorCode and errorMessage only, never details.

When to retry

DEVICE_NOT_CAPABLE never changes on retry: the device doesn’t offer what you asked for. CAPABILITY_PAUSED is temporary, so keep the feature and retry later. INVALID_OEM_RESPONSE is a 502 that won’t clear on retry. Amps doesn’t retry failed commands for you.

Next steps

Error codes

Every code, its status, and what triggers it.

Conflicts

Handle 409 responses when actions collide.