affaan-m/ECC · error · Error

HTTP

Error message

HTTP ${res.status}

What it means

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.

Solutions

  1. Provide a value that satisfies the validation: HTTP res.status
  2. Check the calling command or configuration for the reported field and correct it, then retry.
  3. Run the command with --help to review the expected input shape and allowed values.

Example fix

Correct the invalid input so that the following holds: HTTP res.status
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at scripts/lib/plan-canvas/ui.js:385 when the library encounters an invalid state.

Common situations: Raised when input validation fails because: HTTP res.status. Typically caused by a missing, malformed, or out-of-range argument or configuration value.


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/67acbbfaf319868d. Report an issue: GitHub.

Appendix: source

Thrown at scripts/lib/plan-canvas/ui.js:385

    if (ended || sending) return;
    const items = queue.slice();
    if (extraItems) items.push(...extraItems);
    const text = input.value.trim();
    if (text) items.push({ kind: 'chat', text });
    if (!items.length) {
      statusEl.textContent = 'Nothing to send yet - annotate the plan or type a message.';
      return;
    }
    sending = true;
    sendBtn.disabled = true;
    statusEl.textContent = 'Sending\\u2026';
    try {
      const res = await fetch('/api/session/' + key + '/feedback', {
        method: 'POST',
        headers: { 'content-type': 'application/json' },
        body: JSON.stringify({ items })
      });
      if (!res.ok) throw new Error('HTTP ' + res.status);
      const body = await res.json().catch(() => ({}));
      queue = [];
      persistQueue();
      renderQueue();
      input.value = '';
      // Say what actually happened: a parked agent takes the batch on the
      // spot, otherwise it sits in the queue until the agent checks in.
      statusEl.textContent = body.presence === 'thinking' || body.presence === 'typing'
        ? 'Delivered. Your agent has it.'
        : 'Queued. Your agent picks this up the moment it checks in.';
      if (body.presence) applyPresence(body.presence);
    } catch (err) {
      statusEl.textContent = 'Send failed (' + err.message + ') - is the canvas server still running?';
    } finally {
      sending = false;
      sendBtn.disabled = ended;
    }
  }

View on GitHub (pinned to 06c5e118c4)