Handle normalized SDK failures with the public error class and taxonomy.

EyeballError

Normalized SDK and executor failure with stable taxonomy and retry metadata.

Constructor

ts
constructor(options: EyeballErrorOptions): EyeballError
ParameterTypeRequiredDescription
optionsEyeballErrorOptionsYesStable code, safe message, and optional correlation metadata.

Returns: EyeballError

Properties

PropertyTypeRequiredReadonlyDescription
causeunknownNoNo
codeToolErrorCodeYesYes
executionIdstringNoYes
messagestringYesNo
namestringYesNo
providerDetailProviderErrorDetailNoYes
requestIdstringNoYes
retryablebooleanYesYes
retryAfternumberNoYes
stackstringNoNo

toJSON

Returns the credential-safe normalized error body used on public boundaries.

ts
toJSON(): NormalizedToolError

This call has no parameters.

Returns: NormalizedToolError

TOOL_ERROR_CODES

Stable normalized error codes shared by tools, the executor, and SDK clients.

ts
const TOOL_ERROR_CODES: { readonly INVALID_INPUT: "invalid_input"; readonly AUTH_MISSING: "auth_missing"; readonly AUTH_EXPIRED: "auth_expired"; readonly AUTH_INSUFFICIENT_SCOPE: "auth_insufficient_scope"; readonly NOT_FOUND: "not_found"; readonly RATE_LIMITED: "rate_limited"; readonly PROVIDER_UNAVAILABLE: "provider_unavailable"; readonly PROVIDER_ERROR: "provider_error"; readonly TIMEOUT: "timeout"; readonly NOT_SUPPORTED: "not_supported"; readonly EXECUTION_INTERRUPTED: "execution_interrupted"; readonly EXECUTION_CANCELLED: "execution_cancelled"; }

Types

NormalizedToolError

Credential-safe error body returned by public execution and webhook boundaries.

ts
export interface NormalizedToolError {
  code: ToolErrorCode;
  message: string;
  retryable: boolean;
  /** Non-negative seconds; used with rate_limited when known. */
  retryAfter?: number;
  provider?: ProviderErrorDetail;
}
PropertyTypeRequiredReadonlyDescription
codeToolErrorCodeYesNo
messagestringYesNo
providerProviderErrorDetailNoNo
retryablebooleanYesNo
retryAfternumberNoNoNon-negative seconds; used with rate_limited when known.