{"record":{"id":"67acbbfaf319868d","repo":"affaan-m/ECC","slug":"http-res-status","errorCode":null,"errorMessage":"HTTP ${res.status}","messagePattern":"HTTP \\$\\{res\\.status\\}","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/plan-canvas/ui.js","lineNumber":385,"sourceCode":"    if (ended || sending) return;\n    const items = queue.slice();\n    if (extraItems) items.push(...extraItems);\n    const text = input.value.trim();\n    if (text) items.push({ kind: 'chat', text });\n    if (!items.length) {\n      statusEl.textContent = 'Nothing to send yet - annotate the plan or type a message.';\n      return;\n    }\n    sending = true;\n    sendBtn.disabled = true;\n    statusEl.textContent = 'Sending\\\\u2026';\n    try {\n      const res = await fetch('/api/session/' + key + '/feedback', {\n        method: 'POST',\n        headers: { 'content-type': 'application/json' },\n        body: JSON.stringify({ items })\n      });\n      if (!res.ok) throw new Error('HTTP ' + res.status);\n      const body = await res.json().catch(() => ({}));\n      queue = [];\n      persistQueue();\n      renderQueue();\n      input.value = '';\n      // Say what actually happened: a parked agent takes the batch on the\n      // spot, otherwise it sits in the queue until the agent checks in.\n      statusEl.textContent = body.presence === 'thinking' || body.presence === 'typing'\n        ? 'Delivered. Your agent has it.'\n        : 'Queued. Your agent picks this up the moment it checks in.';\n      if (body.presence) applyPresence(body.presence);\n    } catch (err) {\n      statusEl.textContent = 'Send failed (' + err.message + ') - is the canvas server still running?';\n    } finally {\n      sending = false;\n      sendBtn.disabled = ended;\n    }\n  }","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/lib/plan-canvas/ui.js#L367-L403","documentation":"The plan-canvas browser client sent queued annotations/chat to the feedback endpoint and the HTTP response status was not ok (any non-2xx code, surfaced as the raw status). The response body was not accepted, so the client surfaces the numeric status for diagnosis — common causes are a stale session key after a server restart or the canvas server having exited.","triggerScenarios":"Thrown at scripts/lib/plan-canvas/ui.js:385 when the library encounters an invalid state.","commonSituations":"Raised when input validation fails because: HTTP res.status. Typically caused by a missing, malformed, or out-of-range argument or configuration value.","solutions":["Provide a value that satisfies the validation: HTTP res.status","Check the calling command or configuration for the reported field and correct it, then retry.","Run the command with --help to review the expected input shape and allowed values."],"exampleFix":"Correct the invalid input so that the following holds: HTTP res.status","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}