diegosouzapw/OmniRoute · error

CHIPOTLE_ERROR

CHIPOTLE_ERROR

Error message

sanitizeErrorMessage(msg)

What it means

ChipotleExecutor.execute caught an unexpected exception (connection, WebSocket/transport, or parsing failure), logged it, closed the client, and converted err.message into a sanitized upstream_error response via sanitizeErrorMessage so internal stack details never leak to the caller.

Solutions

  1. Read the CHIPOTLE error log line for the underlying message
  2. Verify Chipotle session credentials and network reachability
  3. Retry; if persistent, check the executor's transport setup for regressions
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at open-sse/executors/chipotle.ts:418 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/6731968365afc47c. Report an issue: GitHub.

Appendix: source

Thrown at open-sse/executors/chipotle.ts:418

          headers: { "Content-Type": "application/json" },
        }),
        url: this.buildUrl(model, stream),
        headers: this.buildHeaders(input.credentials),
        transformedBody: body,
      };
    } catch (err) {
      if (client) client.close().catch(() => {});
      const msg = err instanceof Error ? err.message : String(err);
      log?.error?.("CHIPOTLE", `Error: ${msg}`);

      return {
        response: new Response(
          encoder.encode(
            JSON.stringify({
              error: {
                message: sanitizeErrorMessage(msg),
                type: "upstream_error",
                code: "CHIPOTLE_ERROR",
              },
            })
          ),
          { status: 502, headers: { "Content-Type": "application/json" } }
        ),
        url: this.buildUrl(model, stream),
        headers: this.buildHeaders(input.credentials),
        transformedBody: body,
      };
    }
  }
}

export default ChipotleExecutor;

View on GitHub (pinned to a179ffed5b)