> ## 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)

包含调用服务失败时返回的错误信息。

## ServiceError

ServiceError 对象具有以下规范。

| 成员 | 类型 | 说明 |
| - | - | - |
| code | 32 位有符号整数 | 错误类型。可能的值请参见下表。 |
| source | string | 引发该错误的服务名称。例如,值 `ReputationFD` 表示错误发生在信誉服务中。 |
| description | string | 错误的描述。 |

### 错误代码

| 值 | 说明 |
| - | - |
| 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 服务不可用。 |

## JSON 语法示例

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

## 另请参阅

##### 父主题

[JavaScript 对象表示法 (JSON) 对象参考](/zh-CN/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/v7.0/purchases/grant](/reference/microsoft-store-apis/xstore-v8-grant.md)
