<br />

The Smart Device Management API uses standard gRPC error codes. For more information
on those codes, see [error handling](https://cloud.google.com/apis/design/errors).

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](https://developers.google.com/nest/device-access/api/camera#download_a_camera_image) task [Display](https://developers.google.com/nest/device-access/api/display) device [Doorbell](https://developers.google.com/nest/device-access/api/doorbell) device [Events](https://developers.google.com/nest/device-access/api/events) guide [GenerateImage](https://developers.google.com/nest/device-access/traits/device/camera-event-image#generateimage) command [CameraMotion](https://developers.google.com/nest/device-access/traits/device/camera-motion) trait [CameraPerson](https://developers.google.com/nest/device-access/traits/device/camera-person) trait [CameraSound](https://developers.google.com/nest/device-access/traits/device/camera-sound) trait [DoorbellChime](https://developers.google.com/nest/device-access/traits/device/doorbell-chime) 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](https://developers.google.com/nest/device-access/api/doorbell-battery#extend_a_live_stream) task [ExtendWebRtcStream](https://developers.google.com/nest/device-access/traits/device/camera-live-stream#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](https://developers.google.com/nest/device-access/traits/device/thermostat-mode) trait. The thermostat mode must be changed to HEAT, COOL, or HEATCOOL prior to changing the Eco mode. See also: [Change the mode](https://developers.google.com/nest/device-access/api/thermostat#change_the_mode) task [SetMode](https://developers.google.com/nest/device-access/traits/device/thermostat-eco#setmode) command [ThermostatMode](https://developers.google.com/nest/device-access/traits/device/thermostat-mode) trait [ThermostatTemperatureSetpoint](https://developers.google.com/nest/device-access/traits/device/thermostat-temperature-setpoint) 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](https://developers.google.com/nest/device-access/api/thermostat#change_the_temperature_setpoints) task [ThermostatEco](https://developers.google.com/nest/device-access/traits/device/thermostat-eco) trait [ThermostatTemperatureSetpoint](https://developers.google.com/nest/device-access/traits/device/thermostat-temperature-setpoint) 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](https://developers.google.com/nest/device-access/api/camera#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](https://developers.google.com/nest/device-access/api/thermostat#change_the_temperature_setpoints) task [ThermostatTemperatureSetpoint](https://developers.google.com/nest/device-access/traits/device/thermostat-temperature-setpoint) trait |
| Device not found. | 404 | `NOT_FOUND` | An invalid or missing device name was specified. Specify a valid device. See also: [Connectivity](https://developers.google.com/nest/device-access/traits/device/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](https://developers.google.com/nest/device-access/api/camera#handle_camera_events) task [Display](https://developers.google.com/nest/device-access/api/display) device [Handle doorbell and camera events](https://developers.google.com/nest/device-access/api/doorbell#handle_doorbell_and_camera_events) task [Events](https://developers.google.com/nest/device-access/api/events) guide [CameraEventImage](https://developers.google.com/nest/device-access/traits/device/camera-event-image) trait [CameraMotion](https://developers.google.com/nest/device-access/traits/device/camera-motion) trait [CameraPerson](https://developers.google.com/nest/device-access/traits/device/camera-person) trait [CameraSound](https://developers.google.com/nest/device-access/traits/device/camera-sound) trait [DoorbellChime](https://developers.google.com/nest/device-access/traits/device/doorbell-chime) 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](https://developers.google.com/nest/device-access/authorize#link_your_account) task [GenerateWebRtcStream](https://developers.google.com/nest/device-access/traits/device/camera-live-stream#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](https://developers.google.com/nest/device-access/project/limits#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](https://developers.google.com/nest/device-access/api/camera) device [Camera (battery)](https://developers.google.com/nest/device-access/api/camera-battery) device [Camera (wired)](https://developers.google.com/nest/device-access/api/camera-wired) device [Doorbell (battery)](https://developers.google.com/nest/device-access/api/doorbell-battery) device [Doorbell (wired)](https://developers.google.com/nest/device-access/api/doorbell-wired) device [GenerateWebRtcStream](https://developers.google.com/nest/device-access/traits/device/camera-live-stream#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](https://developers.google.com/nest/device-access/api/thermostat#turn_the_fan_on_or_off) task [Fan](https://developers.google.com/nest/device-access/traits/device/fan) trait |

<br />