Status
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Status
类型定义了适合不同编程环境的逻辑错误模型,包括REST API和RPC API。它由gRPC使用。每条Status
消息包含三部分数据:错误代码、错误消息和错误详细信息。
您可以在API 设计指南中找到有关此错误模型以及如何使用它的更多信息。
JSON 表示 |
---|
{
"code": integer,
"message": string,
"details": [
{
"@type": string,
field1: ...,
...
}
]
} |
领域 |
---|
code | integer 状态代码,应该是google.rpc.Code 的枚举值。 |
message | string 面向开发人员的错误消息,应为英文。任何面向用户的错误消息都应本地化并在google.rpc.Status.details 字段中发送,或由客户端本地化。 |
details[] | object 包含错误详细信息的消息列表。有一组通用的消息类型可供 API 使用。 包含任意类型字段的对象。附加字段"@type" 包含标识类型的 URI。示例: { "id": 1234, "@type": "types.example.com/standard/id" } 。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-09-11。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]