

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Device Shadow 錯誤訊息
<a name="device-shadow-error-messages"></a>

當嘗試變更狀態文件失敗時，Device Shadow 服務會透過 MQTT 發佈訊息至錯誤主題。僅當對其中一個預留 `$aws` 主題的發佈請求回應時，此訊息才會進行發送。如果用戶端使用 REST API 更新文件，則會收到 HTTP 錯誤代碼作為部分回應，而 MQTT 錯誤訊息也不會發出。


****  

| HTTP 錯誤代碼 | 錯誤訊息 | 
| --- | --- | 
| 400 (錯誤的請求) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 
| 401 (未經授權) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 
| 403 (禁止) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 
| 404 (未找到) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 
| 409 (衝突) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 
| 413 (承載過大) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 
| 415 (不支援的媒體類型) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 
| 429 (太多請求) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 
| 500 (內部伺服器錯誤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/iot/latest/developerguide/device-shadow-error-messages.html)  | 