failedPrecondition constant

int const failedPrecondition

Operation was rejected because the system is not in a state required for the operation's execution. For example, directory to be deleted may be non-empty, an rmdir operation is applied to a non-directory, etc.

A litmus test that may help a service implementor in deciding between failedPrecondition, 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 (e.g., restarting a read-modify-write sequence). (c) Use failedPrecondition if the client should not retry until the system state has been explicitly fixed. E.g., if an "rmdir" fails because the directory is non-empty, failedPrecondition should be returned since the client should not retry unless they have first fixed up the directory by deleting files from it.

Implementation

static const failedPrecondition = 9;