> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ServiceError (JSON)

> ServiceError (JSON)

# ServiceError (JSON)

包含服務呼叫失敗時所傳回錯誤的相關資訊。

<a id="ID4EN" />

## ServiceError

ServiceError 物件具有下列規格。

| 成員 | 類型 | 描述 |
| - | - | - |
| code | 32 位元帶正負號的整數 | 錯誤的類型。如需可能的值，請參閱下表。 |
| source | string | 引發錯誤的服務名稱。例如，<code>ReputationFD</code> 值表示錯誤發生在信譽服務中。 |
| description | string | 錯誤的描述。 |

<a id="ID4EBC" />

### 錯誤碼

\| 值| 描述|
\| --- | --- | --- | --- | --- |
\| 0| Success 沒有錯誤|
\| 4000| Invalid Request Body 隨 POST 要求提交的 JSON 文件未通過驗證。如需詳細資料，請參閱 description 欄位。 |
\| 4100| User Does Not Exist 要求 URI 中包含的 XUID 不代表 XBOX Live 上的有效使用者。|
\| 4500| Authorization Error 呼叫者未獲授權執行所要求的作業。|
\| 5000| Service Error 服務中發生內部錯誤|
\| 5300| Service Unavailable 服務無法使用。|

<a id="ID4EQE" />

## 範例 JSON 語法

```json theme={null}
{
    "code": 4000,
    "source": "ReputationFD",
    "description": "No targetXuid field was supplied in the request"
}
    
```

<a id="ID4EZE" />

## 另請參閱

<a id="ID4E2E" />

##### 上層

[JavaScript Object Notation (JSON) 物件參考](/zh-TW/reference/live/rest/json/atoc-xboxlivews-reference-json)


## Related topics

- [Renewing a User Store ID key](/publishing/xstore-commerce/xstore-renew-userstoreid.md)
- [Renovación de una clave de User Store ID](/es/publishing/xstore-commerce/xstore-renew-userstoreid.md)
- [续订 User Store ID 密钥](/zh-CN/publishing/xstore-commerce/xstore-renew-userstoreid.md)
- [collections.mp.microsoft.com/v8.0/collections/consume](/reference/microsoft-store-apis/xstore-v8-consume.md)
- [purchase.mp.microsoft.com/v8.0/purchases/grant](/reference/microsoft-store-apis/xstore-v8-grant.md)
