windmill-labs/windmill · error
SSE request failed: ${response.status} ${response.statusText
Error message
SSE request failed: ${response.status} ${response.statusText} What it means
HTTP-level guard in the dev server's SSE job-watch helper: the fetch to /api/w/{workspace}/jobs_u/getupdate_sse/{jobId} returned a non-2xx status (the message embeds status and status text). Because detectAuthGatewayChallenge already ran, an auth-portal redirect was excluded — so this is a genuine API error: expired/invalid token (401), missing permissions (403), unknown job id (404) or a server error. The faulting input is the authenticated request to the SSE endpoint.
Source
Thrown at cli/src/commands/app/dev.ts:1977
baseUrl: string,
token: string,
): Promise<void> {
const sseUrl =
`${baseUrl}api/w/${workspace}/jobs_u/getupdate_sse/${jobId}?fast=true`;
const extraHeaders = getHeaders();
const response = await fetch(sseUrl, {
headers: {
Accept: "text/event-stream",
Authorization: `Bearer ${token}`,
...extraHeaders,
},
});
await detectAuthGatewayChallenge(response, sseUrl);
if (!response.ok) {
throw new Error(
`SSE request failed: ${response.status} ${response.statusText}`,
);
}
const reader = response.body?.getReader();
if (!reader) {
throw new Error("No response body for SSE stream");
}
const decoder = new TextDecoder();
let buffer = "";
try {
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });View on GitHub (pinned to e474e8803c)
Solutions
- Match the status: 401 → re-login (wmill login / refresh token in the dev session); 403 → check workspace/job permissions; 404 → the job id is wrong or already expired from retention
- Restart the app dev session to pick up fresh credentials
- If 5xx, check backend health/logs — the SSE endpoint itself failed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/app/dev.ts:1977 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/23aec33487f5694f.
Report an issue: GitHub.