Skip to main content

E1711. Secret not found

Severity: ERROR. Class: SecretNotFound (subclass of RuntimeError).

What happened​

get_secret('OPENAI_API_KE'). The secret name doesn't exist in the project's vault. This is distinct from a policy deny.

Why it matters​

Without this distinct error, an agent can't tell whether the secret exists-but-blocked from doesn't-exist. The distinction matters for graceful failure.

How to fix​

The SDK suggests close-match names (Levenshtein-1 over known secret names). Read the suggestion and pick the right name, OR ask the admin to add the secret to the vault.

Catching this error​

except RuntimeError catches this. Programmer error or typo.

See also​