Source code for taimoe.platform.errors.failed_precondition_error
"""Failed precondition error — 400 FAILED_PRECONDITION.
Differs from ``InvalidArgumentError`` in that the *arguments* were fine but the
*state of the system* prevented the operation (e.g. trying to delete a non-empty
team). Distinguished by the canonical ``code`` in the response body.
"""
from __future__ import annotations
from ._base import TaimoeAPIError, _register_code
[docs]
@_register_code("FAILED_PRECONDITION")
class FailedPreconditionError(TaimoeAPIError):
"""Operation rejected because the system state didn't satisfy a precondition."""
default_code = "FAILED_PRECONDITION"