Documentation Index
Fetch the complete documentation index at: https://docs.vaultkit.dev/llms.txt
Use this file to discover all available pages before exploring further.
Error Handling
The SDK wraps every failure in a typedVaultkitError subclass so you can decide how the agent should respond. Catch these errors around your calls to connect() or inside the logic that executes tools.
Error classes
| Error | When it is thrown | Typical response |
|---|---|---|
AuthenticationError | Missing/invalid API key, conflicting vaultId/featureMappingId, revoked credentials, or forbidden provider selection. | Rotate credentials, prompt the user to reconnect, or fall back to a limited experience. |
ConnectionError | Vaultkit service is unreachable or network retries were exhausted. | Retry with backoff, surface a status badge, or queue work for later. |
ToolError | A tool failed to execute (for example invalid parameters returned by the LLM). | Show the error to the end user or ask the agent to reformulate the request. |
ApprovalError | The tool requires a human decision before continuing. | Pause the workflow, notify an operator, or poll the approval endpoint until a decision is made. |
VaultkitError, which exposes message, code, and an optional statusCode.
Pattern example
Logging helpers
Pass alog function to createVaultkitClient to receive structured messages about connection attempts, discovered tools, timeouts, and retries. This makes it easy to correlate application logs with Vaultkit’s telemetry in production.