diegosouzapw/OmniRoute · error · Error
error
Error message
error
What it means
Error "error" thrown in diegosouzapw/OmniRoute.
Source
Thrown at open-sse/executors/promptql.ts:258
origin: "https://prompt.ql.app",
referer: "https://prompt.ql.app/",
"user-agent": USER_AGENT,
},
body: JSON.stringify({ query, variables, operationName }),
signal: signal ?? undefined,
});
const text = await res.text();
let json: { data?: T; errors?: Array<{ message?: string }> };
try {
json = JSON.parse(text) as typeof json;
} catch {
throw new Error(`Non-JSON GraphQL HTTP ${res.status}: ${text.slice(0, 300)}`);
}
if (!res.ok) {
throw new Error(`GraphQL HTTP ${res.status}: ${text.slice(0, 400)}`);
}
if (json.errors?.length) {
throw new Error(json.errors.map((e) => e.message || "error").join("; "));
}
return json.data as T;
}
/**
* Best-effort JWT refresh. Requires browser session cookies (credentials: include
* in the SPA). Headless callers must store those cookies in providerSpecificData.cookie.
* **Not fully verified in production** — see PR notes.
*/
export async function tryRefreshPromptQlToken(opts: {
projectId: string;
cookie?: string;
signal?: AbortSignal | null;
}): Promise<string | null> {
if (!opts.cookie || !opts.projectId) return null;
try {
const res = await fetch(TOKEN_REFRESH_URL, {
method: "POST",View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at open-sse/executors/promptql.ts:258 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/024e90cfa9b01990.
Report an issue: GitHub.