Skip to content

fix(host): explain the channel service's 401 like the directory's - #559

Merged
iamnbutler merged 3 commits into
mainfrom
hosted-401
Oct 22, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
hosted-401

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Creating, moving, deleting, or backing up a hosted channel with a wrong secret said only "The hosting service refused (HTTP 401): Unauthorized." (gap g6 in the onboarding map). The directory and cloud compute already explained a 401 through rejection(). Now refusal(), which only team services' answers go through, hands every 401 to rejection() (moved next to it in http.ts), so the channel service names a wrong ACE_SECRET, a tailnet mismatch, or a missing TAILNET in the directory's words. Compute's separate 401 check goes away; the directory keeps its own so its "Check the URL." suffix stays off 401s.

Smoke-tested ace new --hosted from a source host against a local wrangler dev channel service:

  • wrong secret, before: The hosting service refused (HTTP 401): Unauthorized. The channel was not created.
  • wrong secret, after: The hosting service rejected this host's ACE_SECRET. Ask whoever set it up for the team's secret. The channel was not created.
  • other tailnet, after: The hosting service serves the other.ts.net tailnet, but this Mac is on tail49836a.ts.net. Switch tailnets, or use services deployed for this one. The channel was not created.

Not covered: a hosted channel's WebSocket upgrade refused with 401 still reads "Cannot reach " (see the hostedSocket note).

Part of #541 (the Settings half is a separate PR). Onboarding meta: #550.

Built in Ace

No. Claude Code made this outside Ace, unattended while the user was away, so there was no Ace session to work in. Tracked under dogfooding: #5

Every team-service refusal now goes through refusal(), which hands a 401 to rejection(): a wrong
ACE_SECRET, a tailnet mismatch, or a service without TAILNET. Creating, moving, deleting, and
backing up hosted channels said only "The hosting service refused (HTTP 401)".

Refs #541
@iamnbutler
iamnbutler merged commit 8b7c211 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the hosted-401 branch October 22, 2026 00:08
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.

1 participant