错误代码门户
GoogleGoogle APIs / gRPC错误代码

FAILED_PRECONDITION

FAILED PRECONDITION

其他表示形式:9 · google.rpc.Code.FAILED_PRECONDITION

代码 FAILED_PRECONDITION · Google APIs / gRPC 报告的问题。

操作被拒绝,因为系统未处于操作执行所需的状态。 例如,要删除的目录非空,rmdir 操作应用于非目录等。服务实现者可以使用以下准则来决定“FAILED_PRECONDITION”、“ABORTED”和“UNAVAILABLE”: (a) 如果客户端可以仅重试失败的调用,则使用“UNAVAILABLE”。 (b) 如果客户端应在更高级别重试,请使用“ABORTED”。例如,当客户端指定的测试和设置失败时,指示客户端应重新启动读取-修改-写入序列。 (c) 如果客户端在系统状态明确修复之前不应重试,请使用“FAILED_PRECONDITION”。例如,如果“rmdir”由于目录非空而失败,则应返回“FAILED_PRECONDITION”,因为除非从目录中删除文件,否则客户端不应重试。 HTTP 映射:400 错误请求

Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。

The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level. For example, when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. For example, if an "rmdir" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. HTTP Mapping: 400 Bad Request

故障排除与诊断链接

请先确认文档中的产品、版本及发生环境与当前情况一致。