INNER CODE UNIT · JavaScript

XActionsError

nirholas/XActions · packages/xactions-edge/index.js:32

export class XActionsError extends Error {
  /**
   * @param {string} message
   * @param {{ code?: number|null, tool?: string|null, status?: number|null, retryable?: boolean }} [details]
   */
  constructor(message, { code = null, tool = null, status = null, retryable = false } = {}) {
    super(message);
    this.name = 'XActionsError';
    this.code = code;
    this.tool = tool;
    this.status = status;
    this.retryable = retryable;
  }
}

/**
 * A tool that costs money. Four of the hosted server's tools are free; the two
 * that mirror its paid REST endpoints answer with x402 terms instead of data.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…