您正在查看 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" }。 | 
          
        
      
    
  
  
  
  
 
  
    
    
      
       
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):2025-07-25。
  
  
  
    
      [null,null,["最后更新时间 (UTC):2025-07-25。"],[],["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"]]