Skip to content

fix(host): show short reasons when a hosting service or the directory fails - #393

Merged
iamnbutler merged 2 commits into
mainfrom
move-error-text
Oct 15, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
move-error-text

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Fixes #392.

A failed answer from a hosting service or the directory now goes through one helper, refusal in apps/host/src/http.ts. It returns the status, plus the service's own message only when that message is short, single-line plain text or JSON (error/message). Error pages such as Cloudflare's "Worker threw exception" HTML go to the host log (http.refused, with the full body) and are never shown.

  • Move (move.ts): every failure also says where the channel is now. Examples: "The hosting service failed (HTTP 500). The channel is still on this Mac." "The hosting service refused (HTTP 409): The channel is busy; wait until it is idle (state: active). The channel is still on this Mac." When an activation went unanswered, the existing "may now be active there… run the same move again" text is kept. A move back from a service ends with "The channel is still on ."
  • Hosted create and delete (manage.ts) end with "The channel was not created." or "…not deleted." A fetch failure on create no longer passes through a fake 502.
  • Directory check and sync (directory.ts) keep their 401 secret messages. Other failures use the helper and log the body.
  • The shared Toaster description is clamped to six lines (line-clamp-6 break-words), so no toast can show unbounded text.

Smoke-tested with a source ace serve --loopback host (tailscale stub on PATH, isolated ACE_HOME) and a local fake service that returns a 500 HTML page, a 409 plain-text error and a 503 JSON error. I tested through ace move and through the app's Move menu in headless Chromium. Before this change, the same HTML case printed the raw page.

Built in Ace

No. This was built with Claude Code outside Ace by an overnight issue watcher, because this Mac's Ace Canary is a participant in the running two-person study (#218). The dogfooding gap is tracked in #5.

… fails

A service's failed answer now reads as its status plus the service's own
message, when it wrote a short plain-text or JSON one; error pages such as
Cloudflare's "Worker threw exception" HTML go to the host log instead. A
failed move also says where the channel is now. Toast descriptions are
clamped to six lines as a backstop.

Fixes #392

Why: apps/host/src/http.ts#function refusal | service error bodies reach the app only when short, single-line plain text or JSON the service wrote; anything else is logged, not shown
Why: apps/host/src/move.ts#function stranded | every failed move says where the channel is now: still on this Mac, still on the service, or fenced pending a rerun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move to hosting shows a service's raw HTML error page

1 participant