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:
| Code | Typical meaning |
|---|---|
API_KEY_MISSING | No API key was provided and CONFIGURE_API_KEY was not set. |
AUTH_REQUIRED | Token is missing, invalid, expired, or rejected by the API. |
INVALID_INPUT | SDK-side or API-side input validation failed. |
TOOL_NOT_CONNECTED | A connector-backed tool requires a user connection that is not available. |
NETWORK_ERROR | Fetch failed before an API response was received. |
RATE_LIMITED | The API returned a rate limit response. |
NOT_FOUND | The requested resource was not found. |
SERVER_ERROR | The backend returned a 5xx or structured API error. |
TIMEOUT | The request timed out. |
ACCESS_DENIED | The runtime is not allowed to access the requested resource or tool. |
TOOL_ERROR | A connector or provider operation failed. |
PAYMENT_REQUIRED | Billing or quota limits blocked the request. |
Common PR1 cases map to those codes:
- Missing linked
tokenor app-localexternalId: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:
codestatusCodetypeparamretryablesuggestedActiondocUrlretryAfterrequestId
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