ErrorDetail
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSON 表示法 |
{
"code": integer,
"field": string,
"message": string,
"value": string,
"fieldIndex": integer
} |
字段 |
code |
integer
状态代码,应为 ErrorCode 的枚举值。
|
field |
string
指向请求正文中字段的路径。该值是一个以点分隔的标识符序列,用于标识协议缓冲区字段。例如“errorDetails.field”会标识出此字段。
|
message |
string
说明此字段导致失败的原因。此消息为英文,可能不适合向用户显示。
|
value |
string
导致请求失败的值。
|
fieldIndex |
integer
如果生成此错误的请求字段重复出现,此字段将包含该字段中导致验证失败的条目的索引(从零开始)。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe JSON representation details errors encountered during validation or internal processes, providing specific information about the error.\u003c/p\u003e\n"],["\u003cp\u003eError details include a status code, field path, error message, problematic value, and potentially the index within a repeated field.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003efield\u003c/code\u003e attribute uses dot-separated identifiers to pinpoint the location of the error within the request body.\u003c/p\u003e\n"],["\u003cp\u003eWhile the \u003ccode\u003emessage\u003c/code\u003e offers a description of the failure, it's intended for internal use and might not be user-friendly.\u003c/p\u003e\n"]]],[],null,["# ErrorDetail\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nDetails an error that resulted in a validation or internal failure.\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------|---|\n| ``` { \"code\": integer, \"field\": string, \"message\": string, \"value\": string, \"fieldIndex\": integer } ``` |\n\n| Fields ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `code` | `integer` The status code, which should be an enum value of [ErrorCode](/my-business/reference/rest/Shared.Types/ErrorCode). |\n| `field` | `string` A path leading to a field in the request body. The value is a sequence of dot-separated identifiers that identify a protocol buffer field. For example, \"errorDetails.field\" would identify this field. |\n| `message` | `string` A description of why the field caused a failure. The message is in English and may not be suitable for display to users. |\n| `value` | `string` The value that failed the request. |\n| `fieldIndex` | `integer` If the request field that generated this error is repeated, this will contain the zero based index of the entry in that field which caused validation to fail. |"]]