ErrorDetail
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trình bày chi tiết về một lỗi dẫn đến việc xác thực hoặc lỗi nội bộ.
Biểu diễn dưới dạng JSON |
{
"code": integer,
"field": string,
"message": string,
"value": string,
"fieldIndex": integer
} |
Trường |
code |
integer
Mã trạng thái, phải là một giá trị enum của ErrorCode .
|
field |
string
Đường dẫn dẫn đến một trường trong nội dung yêu cầu. Giá trị là một chuỗi các giá trị nhận dạng được phân tách bằng dấu chấm nhằm xác định một trường vùng đệm giao thức. Ví dụ: "errorDetails.field" sẽ xác định trường này.
|
message |
string
Nội dung mô tả lý do trường này gây ra lỗi. Thông báo này bằng tiếng Anh và có thể không phù hợp để người dùng nhìn thấy.
|
value |
string
Giá trị không thực hiện được yêu cầu.
|
fieldIndex |
integer
Nếu trường yêu cầu đã tạo ra lỗi này lặp lại, trường này sẽ chứa chỉ mục dựa trên 0 của mục nhập trong trường đó khiến việc xác thực không thành công.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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. |"]]