Medium Risk
Changes authentication error types and user-visible messages for non-pairing primary HTTP failures (generic operation/status text instead of API details); pairing and timeout copy is preserved.
Overview
Primary environment auth failures are split into tagged Schema errors instead of generic Error strings and HTTP-derived PrimaryEnvironmentRequestError.detail text.
Pairing and bootstrap: blank tokens throw PrimaryEnvironmentPairingCredentialRequiredError (with providedLength); invalid credentials from browserSession become PrimaryEnvironmentPairingCredentialRejectedError with the same user-facing copy as before. Post-bootstrap session polling throws PrimaryEnvironmentAuthSessionTimeoutError with timing fields while gate state still surfaces the existing timeout message.
Request errors: PrimaryEnvironmentRequestError drops detail and the readHttpApiErrorMessage / friendly-bootstrap mappers; fromCause only needs operation + cause, and message is derived from operation and HTTP status without leaking transport text.
Tests add installDesktopBootstrap, cover blank/rejected pairing, request message derivation, and desktop bootstrap timeout; invalid-token expectations move to the new rejected-credential type.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 16636785aaf08a3b78ef130ab33b1ce12e733f87. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
77fab46e-5a7d-4275-bb16-8706b3ac76d7You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands and usage tips.