Surface Wrong-Cluster Clone Errors Clearly

in git-remote-entire, let's special case this error message and surface it nicely to the user:
09:55:27 $ git clone entire://aws-us-east-2.entire.io/et/paul/dogbark "$(mktemp -d)" Cloning into '/var/folders/vw/c9lnz3m55v124_2h0hv7p4lh0000gn/T/tmp.jwCHMfmsWg'... fatal: stateless-connect v2 info/refs: fetching info/refs from entry domain: repo-scoped token exchange: oauth token exchange: HTTP 400: {"error":"invalid_target","error_description":"audience host "aws-us-east-2.entire.io" does not host this repo; it lives on "aws-eu-central-1.entire.io" — re-target the request there"}
new branch and open a PR
Done. PR opened: https://github.com/entireio/cli/pull/1575
What changed:
httputil.OAuthErrornow captureserror_description(RFC 6749).git-remote-entiredigs the buriedOAuthErrorout viaerrors.As; forinvalid_targetwhose description names the hosting cluster, it prints an actionable message + correctedgit clone entire://...URL instead of the raw HTTP 400 chain.
Before: fatal: stateless-connect v2 info/refs: ... HTTP 400: {"error":"invalid_target",...}
After: fatal: this repository is not hosted on aws-us-east-2.entire.io; it lives on aws-eu-central-1.entire.io. + the corrected clone command.
Notes:
- Only the wrong-cluster case (description matches
lives on "<host>") is special-cased; otherinvalid_targetvariants (e.g. suspended mirror) fall back verbatim. - Pushed to
origin, but PR had to be created with--repo entireio/clisinceghdoesn't recognize theentire://remotes.
Both review comments addressed. Committed (not pushed, per your workflow).
- r3495473008 (linked):
TestPostOAuthToken_ErrorCodenow assertsOAuthError.Descriptionfor both JSON and non-JSON bodies, so the wrong-cluster UX can't silently regress. - The other Copilot comment: corrected URL now copies the user's parsed URL and swaps only the host, preserving
RawPath/query escaping instead of dropping them.
Tests + lint green. Push when ready.