diegosouzapw/OmniRoute · error · RecordedTriageTimeoutError

ISSUE_AGENT_TIMEOUT

ISSUE_AGENT_TIMEOUT

Error message

${sanitizeErrorMessage(error.message)}

What it means

Error "${sanitizeErrorMessage(error.message)}" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/app/api/issue-agent/runs/route.ts:125

        provider: parsed.provider,
        routingPolicy: parsed.routingPolicy,
        timeoutMs: parsed.timeoutMs,
      },
      postChatCompletion
    );
    return NextResponse.json(
      {
        ...run,
        runner: "omniroute-chat-completions",
        auditPath: audit.path,
        completion: completion.body,
      },
      { status: completion.status }
    );
  } catch (error) {
    if (error instanceof RecordedTriageTimeoutError) {
      return NextResponse.json(
        { error: sanitizeErrorMessage(error.message), code: "ISSUE_AGENT_TIMEOUT" },
        { status: 504 }
      );
    }
    // Hard Rule #12: never put a raw err.message in a response. Validation
    // failures thrown by this module (bad issue URL, malformed GitHub export)
    // are safe, curated messages meant for the client — sanitizeErrorMessage()
    // is a no-op for them. An opaque Node system/fs error (e.g. audit.ts
    // failing to mkdir/appendFile under DATA_DIR) is replaced with a generic
    // message instead, since its raw text would otherwise embed the server's
    // absolute filesystem path.
    const message = isNodeSystemError(error)
      ? "Issue Agent request failed due to an internal error"
      : sanitizeErrorMessage(error instanceof Error ? error.message : "Invalid issue-agent request");
    return NextResponse.json({ error: message }, { status: 400 });
  }
}

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/app/api/issue-agent/runs/route.ts:125 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/fdaba6eb43fcd853. Report an issue: GitHub.