thedotmack/claude-mem · error

push ${res.status}: ${(await res.text().catch(() => "")).sli

Error message

push ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}

What it means

Error "push ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}" thrown in thedotmack/claude-mem.

Source

Thrown at workers/sync-hub/canary/canary.ts:240

			origin_local_id: localId,
			payload,
			payload_schema_version: 2,
			payload_sha256: await sha256Base64Url(canonicalJson(payload)),
		};
		const body = canonicalJson(envelope);
		const operationSha256 = await sha256Base64Url(body);
		const res = await fetch(`${this.args.hub}/v1/sync/ops`, {
			method: "POST",
			headers: { ...this.headers(deviceId), "Content-Type": "application/json" },
			body: JSON.stringify({
				protocol_version: 2,
				ops: [{ body, operation_sha256: operationSha256 }],
			}),
			signal: AbortSignal.timeout(this.args.timeoutMs),
		});
		this.noteMode(res);
		if (!res.ok) {
			throw new Error(`push ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
		}
		const parsed = (await res.json()) as {
			acked: Array<{ operation_sha256: string; seq: string }>;
			head_seq: string;
		};
		const ack = parsed.acked.find((a) => a.operation_sha256 === operationSha256);
		if (!ack) throw new Error("push response did not ack the canary op");
		return { seq: ack.seq, headSeq: parsed.head_seq, opSha: operationSha256 };
	}

	private async pull(
		deviceId: string,
		since: string,
	): Promise<{ ops: Array<{ seq: string; operation_sha256: string }>; headSeq: string }> {
		const res = await fetch(`${this.args.hub}/v1/sync/changes?since=${since}&limit=500`, {
			headers: this.headers(deviceId),
			signal: AbortSignal.timeout(this.args.timeoutMs),
		});

View on GitHub (pinned to d768ba3643)

Solutions

  1. Inspect the status code and body in the message: auth failures mean bad hub credentials, 5xx means hub-side errors (check hub logs).
  2. Verify the canary's hub URL and that the sync-hub deployment is healthy before rerunning the canary.

When it happens

Trigger: Fires in the sync-hub canary when the push endpoint returns a non-2xx status, e.g. the hub Worker is erroring, auth headers are rejected, or the request body violates a hub invariant. Guard at workers/sync-hub/canary/canary.ts:240 fails the canary loudly (with a truncated body excerpt) instead of reporting a healthy hub.

Common situations: See trigger scenarios.


AI-assisted analysis of thedotmack/claude-mem@d768ba3643 (2026-08-12). Data as JSON: /api/errors/01d49568147a7b72. Report an issue: GitHub.