API Error Code Reference

The Smart Device Management API uses standard gRPC error codes. For more information on those codes, see error handling.

An error response in the API appears in the following format:

{
  "error": {
    "code": 404,
    "message": "Device enterprises/project-id/devices/device-id not found.",
    "status": "NOT_FOUND"
  }
}

Use the search box in the Error Codes table to find API errors, along with troubleshooting tips and related traits and guides. You can search for content in any field in the table.

Error Message HTTP RPC Troubleshooting
Camera image is no longer available for download. 504 DEADLINE_EXCEEDED Event images expire 30 seconds after the event is published. Make sure to download the image prior to expiration.

See also:
  Download a camera image task
  Display device
  Doorbell device
  Events guide
  GenerateImage command
  CameraMotion trait
  CameraPerson trait
  CameraSound trait
  DoorbellChime trait
Command is not supported for doorbell. 400 FAILED_PRECONDITION A WebRTC stream cannot be extended on battery-powered doorbells. If a stream on a doorbell needs to be viewed beyond the initial session length, stop the existing stream and generate a new one.

See also:
  Extend a live stream task
  ExtendWebRtcStream command
Command not allowed in current thermostat mode. 400 FAILED_PRECONDITION Some thermostat models do not support changing the Eco mode when the thermostat mode is OFF, according to the ThermostatMode trait. The thermostat mode must be changed to HEAT, COOL, or HEATCOOL prior to changing the Eco mode.

See also:
  Change the mode task
  SetMode command
  ThermostatMode trait
  ThermostatTemperatureSetpoint trait
Command not allowed when thermostat in MANUAL_ECO mode. 400 FAILED_PRECONDITION The temperature setpoint cannot be set when the thermostat is in manual Eco mode.

See also:
  Change the temperature setpoints task
  ThermostatEco trait
  ThermostatTemperatureSetpoint trait
Command not provided. 404 NOT_FOUND A command was executed without a valid command name in the request body. Enter a valid command.
Command not supported. 400 INVALID_ARGUMENT Used an RTSP livestream command for a camera that supports WebRTC, or used a WebRTC livestream command for a camera that supports RTSP.

See also:
  Download a camera image task
Contains an invalid value. 400 INVALID_ARGUMENT A command was submitted with an invalid value in the arguments. Make sure to send a valid value.
Cool value must be greater than heat value. 400 INVALID_ARGUMENT Make sure that the heatCelsius field is less than the coolCelsius field in your command.

See also:
  Change the temperature setpoints task
  ThermostatTemperatureSetpoint trait
Device not found. 404 NOT_FOUND An invalid or missing device name was specified. Specify a valid device.

See also:
  Connectivity trait
Enterprise not found. 404 NOT_FOUND An invalid or missing Project ID was specified. Specify a valid Project ID.
Event id does not belong to the camera. 400 FAILED_PRECONDITION Use the correct eventID returned by the camera event.

See also:
  Handle camera events task
  Display device
  Handle doorbell and camera events task
  Events guide
  CameraEventImage trait
  CameraMotion trait
  CameraPerson trait
  CameraSound trait
  DoorbellChime trait
Failed to retrieve answer SDP due to timeout. 504 DEADLINE_EXCEEDED Try to generate the WebRTC live stream again.

See also:
Field is not present in traits. 400 INVALID_ARGUMENT An unsupported command was sent for a trait.
Invalid Offer SDP is missing CRLF. 400 INVALID_ARGUMENT The newline character is missing at the end of the offerSdp string when attempting to generate a WebRTC stream. Make sure the offerSdp string ends with \r\n or \n and try to generate the stream again.

See also:
Invalid Offer SDP m-lines. 400 INVALID_ARGUMENT Offer SDP must contain all three of the audio, video, and application m-lines in that order.

See also:
Invalid Offer SDP. 400 INVALID_ARGUMENT Offer SDP audio must be set to a=recvonly (receive only).

See also:
Permission denied. 403 PERMISSION_DENIED The user has not granted the developer the appropriate device-level permissions in Partner Connections Manager (PCM) required to execute a command.

When generating a WebRTC live stream, this error can also mean that the audio setting in the offerSdp is incorrect.

See also:
  Link your account task
  GenerateWebRtcStream command
Rate limited. 429 RESOURCE_EXHAUSTED Each developer has a quota limiting how many calls they can make. If you make more calls than your quota, you will receive the Rate limited message. To fix this, resubmit the call once the quota has expired.

See also:
  Sandbox rate limits concept
Room not found. 404 NOT_FOUND The room does not exist in the structure. Make a list call to the rooms resource to verify the Room ID.
Structure not found. 404 NOT_FOUND The structure does not exist in the Project. Make a list call to the structure resource to verify the Structure ID.
The camera is not available for streaming. 400 FAILED_PRECONDITION The camera is either offline or not available for streaming due to a technical issue.

See also:
  Camera device
  Camera (battery) device
  Camera (wired) device
  Doorbell (battery) device
  Doorbell (wired) device
  GenerateWebRtcStream command
Thermostat fan unavailable. 400 FAILED_PRECONDITION The thermostat does not have a fan capability. Fan-related traits and commands cannot be used for this device.

See also:
  Turn the fan on or off task
  Fan trait