{"record":{"id":"bc3625e329e10960","repo":"heygen-com/hyperframes","slug":"lint-endpoint-returned-response-status","errorCode":null,"errorMessage":"lint endpoint returned ${response.status}","messagePattern":"lint endpoint returned (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/utils/studioSelectionClient.ts","lineNumber":155,"sourceCode":"  server: ActiveServer,\n  fetchImpl: typeof fetch = fetch,\n): Promise<StudioSelectionResponse> {\n  const url = studioSelectionUrl(server);\n  const response = await fetchImpl(url);\n  if (!response.ok) {\n    throw new Error(`selection endpoint returned ${response.status}`);\n  }\n  return (await response.json()) as StudioSelectionResponse;\n}\n\nexport async function fetchStudioLint(\n  server: ActiveServer,\n  fetchImpl: typeof fetch = fetch,\n): Promise<StudioLintResponse> {\n  const url = studioApiUrl(server, \"lint\");\n  const response = await fetchImpl(url);\n  if (!response.ok) {\n    throw new Error(`lint endpoint returned ${response.status}`);\n  }\n  return (await response.json()) as StudioLintResponse;\n}\n","sourceCodeStart":137,"sourceCodeEnd":159,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/cli/src/utils/studioSelectionClient.ts#L137-L159","documentation":"Thrown by fetchStudioLint when the Studio preview server's /api/projects/<projectName>/lint endpoint returns a non-OK HTTP status. This endpoint runs the composition linter server-side and returns lint results. A non-OK response means the lint route itself failed, not that the composition has lint errors (those return 200 with error entries in the body).","triggerScenarios":"The lint route handler threw an unhandled exception server-side; the project name doesn't match; the Studio server is in a degraded state; the server version doesn't have the lint route yet (older version).","commonSituations":"Running an older Studio server that predates the lint route; the server crashed partially; a bug in the server-side linter for a specific composition structure.","solutions":["Restart the Studio preview server.","Update both CLI and Studio to the latest version to ensure the lint route exists.","Run hyperframes lint directly (without the Studio server) as a fallback.","Check the Studio server console for the stack trace of the route handler failure."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"async function isLintEndpointHealthy(server: ActiveServer): Promise<boolean> {\n  try {\n    const res = await fetch(studioApiUrl(server, \"lint\"), { signal: AbortSignal.timeout(5000) });\n    return res.ok;\n  } catch {\n    return false;\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  const lint = await fetchStudioLint(server);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"lint endpoint\")) {\n    // Fall back to CLI-side linting without the Studio server\n    console.warn(`Studio lint endpoint unhealthy. Running standalone lint.`);\n    return runStandaloneLint();\n  }\n  throw err;\n}","preventionTips":["Keep CLI and Studio server versions aligned.","Restart the Studio server after updates.","Use hyperframes lint directly as a fallback when the Studio route is unavailable."],"tags":["studio","network","http","lint"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}