{"record":{"id":"7f8ca4974db5ce22","repo":"earendil-works/pi","slug":"no-response-body","errorCode":null,"errorMessage":"No response body","messagePattern":"No response body","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/ai/src/api/openai-codex-responses.ts","lineNumber":460,"sourceCode":"\t\t\t\t\tif (\n\t\t\t\t\t\tattempt < maxRetries &&\n\t\t\t\t\t\t!(lastError instanceof RetryDelayExceededError) &&\n\t\t\t\t\t\t!lastError.message.includes(\"usage limit\")\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst delayMs = BASE_DELAY_MS * 2 ** attempt;\n\t\t\t\t\t\tawait sleep(delayMs, options?.signal);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tthrow lastError;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!response?.ok) {\n\t\t\t\tthrow lastError ?? new Error(\"Failed after retries\");\n\t\t\t}\n\n\t\t\tif (!response.body) {\n\t\t\t\tthrow new Error(\"No response body\");\n\t\t\t}\n\n\t\t\tif (!startEmitted) {\n\t\t\t\tstartEmitted = true;\n\t\t\t\tstream.push({ type: \"start\", partial: output });\n\t\t\t}\n\t\t\tawait processStream(response, output, stream, model, grammarToolInputProperties, options);\n\n\t\t\tif (options?.signal?.aborted) {\n\t\t\t\tthrow new Error(\"Request was aborted\");\n\t\t\t}\n\n\t\t\tassertSuccessfulOutput(output);\n\t\t\tstream.push({ type: \"done\", reason: output.stopReason, message: output });\n\t\t\tstream.end();\n\t\t} catch (error) {\n\t\t\tfor (const block of output.content) {\n\t\t\t\t// Streaming scratch buffers are only used during parsing; never persist them.","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/ai/src/api/openai-codex-responses.ts#L442-L478","documentation":"Error \"No response body\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/ai/src/api/openai-codex-responses.ts:460 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry; verify the endpoint returns a streamed response body."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}