Type: simplification / UX · Difficulty: medium
A near-identical handleError is copy-pasted across 5+ commands (IndexCommand.ts:75, IngestCommand.ts:115, StatsCommand.ts:101, LsCommand.ts:54, DeleteCommand.ts:67). When the server is down, a connection-refused/abort from fetch becomes HttpClientError("request failed: …") (httpClient.ts:37,56,70) and is printed verbatim — no hint that the daemon is not running.
Do: detect connection-refused/abort in httpClient and surface a friendly message (e.g. "could not reach bytebell-server on port X — is it running? try bytebell server"); extract the duplicated handleError into one shared helper.
Done when: one handleError is reused; server-down prints actionable guidance.
Type: simplification / UX · Difficulty: medium
A near-identical
handleErroris copy-pasted across 5+ commands (IndexCommand.ts:75,IngestCommand.ts:115,StatsCommand.ts:101,LsCommand.ts:54,DeleteCommand.ts:67). When the server is down, a connection-refused/abort fromfetchbecomesHttpClientError("request failed: …")(httpClient.ts:37,56,70) and is printed verbatim — no hint that the daemon is not running.Do: detect connection-refused/abort in
httpClientand surface a friendly message (e.g. "could not reach bytebell-server on port X — is it running? trybytebell server"); extract the duplicatedhandleErrorinto one shared helper.Done when: one
handleErroris reused; server-down prints actionable guidance.