Errors
If a call fails, the SDK raises one of these errors:APIError is a subclass of InfisicalError, and you can import both from infisical_sdk.
This example creates a secret if it doesn’t exist yet:
Retries
If a request fails with a network error, such as a refused connection or a timeout, the SDK retries the request up to four times. It waits about one second before the first retry and doubles the wait before each retry after that. Most requests that create or delete something in Agent Vault are retried only if the connection never opened, so a retry can’t make the change twice. Requests fromdelegations.set and delegations.add_subjects are retried after any network error.
The SDK doesn’t retry a request that Infisical rate-limits. It raises an APIError whose status_code is 429.
The SDK sets no timeout on requests, and you can’t change the number of retries.