Generated API
Errors API
Handle normalized SDK failures with the public error class and taxonomy.
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| Parameter | Type | Required | Description |
|---|---|---|---|
options | EyeballErrorOptions | Yes | Stable code, safe message, and optional correlation metadata. |
Returns: EyeballError
Properties
| Property | Type | Required | Readonly | Description |
|---|---|---|---|---|
cause | unknown | No | No | — |
code | ToolErrorCode | Yes | Yes | — |
executionId | string | No | Yes | — |
message | string | Yes | No | — |
name | string | Yes | No | — |
providerDetail | ProviderErrorDetail | No | Yes | — |
requestId | string | No | Yes | — |
retryable | boolean | Yes | Yes | — |
retryAfter | number | No | Yes | — |
stack | string | No | No | — |
toJSON
Returns the credential-safe normalized error body used on public boundaries.
ts
toJSON(): NormalizedToolErrorThis 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;
}| Property | Type | Required | Readonly | Description |
|---|---|---|---|---|
code | ToolErrorCode | Yes | No | — |
message | string | Yes | No | — |
provider | ProviderErrorDetail | No | No | — |
retryable | boolean | Yes | No | — |
retryAfter | number | No | No | Non-negative seconds; used with rate_limited when known. |