Defines base and API error classes for Agent Vault SDK.
// Source: https://github.com/Infisical/agent-vault | License: MIT | Copyright 2022 Infisical Inc
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Base error class for all Agent Vault SDK errors.
* Thrown for client-side issues (missing config, network failures, timeouts).
*/
export class AgentVaultError extends Error {
constructor(message: string) {
super(message);
this.name = "AgentVaultError";
}
}
/**
* Error returned by the Agent Vault API.
* Wraps HTTP error responses with status code, error code, and message.
*/
export class ApiError extends AgentVaultError {
readonly status: number;
readonly code: string;
readonly headers: Headers;
constructor({
status,
code,
message,
headers,
}: {
status: number;
code: stri
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key