شما در حال مشاهده اسناد قدیمی برای Google Photos Library API هستید.
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" } . |
،
نوع 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" } . |
،
نوع 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" } . |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e type is a structured approach to representing errors in APIs, suitable for REST and RPC.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eStatus\u003c/code\u003e object contains the error code (\u003ccode\u003einteger\u003c/code\u003e), an English error message (\u003ccode\u003estring\u003c/code\u003e), and an optional array of objects with error details (\u003ccode\u003edetails\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003edetails\u003c/code\u003e object includes an \u003ccode\u003e@type\u003c/code\u003e field with a URI to specify the type of error, enabling flexible representation.\u003c/p\u003e\n"]]],["The `Status` type represents a logical error model with three data components: `code`, `message`, and `details`. `code` is an integer representing the status code. `message` is a developer-facing error string, preferably in English. `details` is a list of objects that convey detailed error information, each with a `\"@type\"` field to identify its type. It is designed for various environments, like REST and RPC APIs, and is used by gRPC.\n"],null,["# Status\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nThe `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------|\n| ``` { \"code\": integer, \"message\": string, \"details\": [ { \"@type\": string, field1: ..., ... } ] } ``` |\n\n| Fields ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `code` | `integer` The status code, which should be an enum value of `google.rpc.Code`. |\n| `message` | `string` A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details](/photos/library/legacy/reference/rest/v1/Status#FIELDS.details) field, or localized by the client. |\n| `details[]` | `object` A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field `\"@type\"` contains a URI identifying the type. Example: `{ \"id\": 1234, \"@type\": \"types.example.com/standard/id\" }`. |"]]