diegosouzapw/OmniRoute · error · Error
Non-JSON GraphQL HTTP ${res.status}: ${text.slice(0, 300)}
Error message
Non-JSON GraphQL HTTP ${res.status}: ${text.slice(0, 300)} What it means
Error "Non-JSON GraphQL HTTP ${res.status}: ${text.slice(0, 300)}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at open-sse/executors/promptql.ts:252
const res = await fetch(endpoint, {
method: "POST",
headers: {
accept: "application/json",
"content-type": "application/json",
authorization: `Bearer ${token}`,
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;View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at open-sse/executors/promptql.ts:252 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/86b45346cf7aab59.
Report an issue: GitHub.