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
All error classes extend
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.