diegosouzapw/OmniRoute · error · Error
Clerk /v1/client returned HTTP
Error message
Clerk /v1/client returned HTTP ${resp.status} — check your __client cookie What it means
Step 1 of the adapta-web Clerk auth flow: GET /v1/client with the stored __client cookie returned a non-2xx status. The cookie is stale, revoked, or malformed, so Clerk refuses to enumerate sessions — the input at fault is the connection's __client cookie value.
Solutions
- Log in to Adapta again and re-save a fresh __client cookie on the provider connection
- Check the HTTP status: 401/403 means the cookie is expired/invalid and must be replaced; 5xx suggests retrying later
- Verify the connection's cookie field was copied in full without truncation
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at open-sse/executors/adapta-web.ts:105 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/3250802020d1a684.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/executors/adapta-web.ts:105
// ── Clerk auth flow ───────────────────────────────────────────────────────────
/** Step 1: GET /v1/client → returns active session ID. */
async function getSessionId(
clientJwt: string,
signal?: AbortSignal | null,
log?: ExecuteInput["log"]
): Promise<string> {
const resp = await fetch(`${ADAPTA_CLERK_URL}/v1/client`, {
headers: {
Cookie: `__client=${clientJwt}`,
"User-Agent": USER_AGENT,
Origin: ADAPTA_APP_URL,
},
signal: signal ?? undefined,
});
if (!resp.ok) {
throw new Error(`Clerk /v1/client returned HTTP ${resp.status} — check your __client cookie`);
}
const body = await resp.json();
const sessions: Array<{ id: string; status: string }> = body?.response?.sessions ?? [];
const active = sessions.find((s) => s.status === "active");
if (!active?.id) {
throw new Error(
"No active Clerk session found — your __client cookie may be expired or invalid"
);
}
log?.info?.("ADAPTA-WEB", `Got session ID: ${active.id}`);
return active.id;
}
/** Step 2: POST /v1/client/sessions/{id}/tokens → fresh short-lived JWT. */
async function refreshSessionJwt(
clientJwt: string,View on GitHub (pinned to a179ffed5b)