Skip to content

Errors Reference

SDK methods reject with ConfigureError for API, validation, permission, tool, timeout, and network failures.

ts
import { ConfigureError, ErrorCode } from "configure";

try {
  await profile.executeTool(toolCall);
} catch (error) {
  if (error instanceof ConfigureError) {
    console.error(error.code, error.statusCode, error.type, error.requestId);
  }
}

Error Codes

ErrorCode exports these values:

CodeTypical meaning
API_KEY_MISSINGNo API key was provided and CONFIGURE_API_KEY was not set.
AUTH_REQUIREDToken is missing, invalid, expired, or rejected by the API.
INVALID_INPUTSDK-side or API-side input validation failed.
TOOL_NOT_CONNECTEDA connector-backed tool requires a user connection that is not available.
NETWORK_ERRORFetch failed before an API response was received.
RATE_LIMITEDThe API returned a rate limit response.
NOT_FOUNDThe requested resource was not found.
SERVER_ERRORThe backend returned a 5xx or structured API error.
TIMEOUTThe request timed out.
ACCESS_DENIEDThe runtime is not allowed to access the requested resource or tool.
TOOL_ERRORA connector or provider operation failed.
PAYMENT_REQUIREDBilling or quota limits blocked the request.

Common PR1 cases map to those codes:

  • Missing linked token or app-local externalId: INVALID_INPUT.
  • Invalid or reserved agent handle: INVALID_INPUT.
  • Disabled connector/action tool: ACCESS_DENIED.
  • Unknown tool call that reaches dispatch: INVALID_INPUT.
  • Missing connector connection: TOOL_NOT_CONNECTED.
  • Backend API error: SERVER_ERROR.

Structured Fields

ConfigureError exposes fields directly:

  • code
  • statusCode
  • type
  • param
  • retryable
  • suggestedAction
  • docUrl
  • retryAfter
  • requestId

There is no status or details property on ConfigureError.

Tool Rejection Behavior

Call profile.tools() with the same connector and action options you intend to execute. profile.executeTool() records the enabled names and rejects anything outside that set.

ts
profile.tools({ connectors: ["gmail"] });

await profile.executeTool({
  name: "configure_email_send",
  arguments: {},
}); // throws ConfigureError with code ACCESS_DENIED

Personalization infrastructure for agents