Uh oh!
There was an error while loading. Please reload this page.
[codex] Structure mobile cloud-link failures - #3320
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved This PR refactors error handling to use structured error types and redacts URL secrets from error diagnostics - a security improvement. The core cloud-linking business logic is unchanged; only error construction and formatting changes. You can customize Macroscope's approvability policy. Learn more. |
Dismissing prior approval to re-evaluate fb67183
fb67183 to
21bfa07CompareDismissing prior approval to re-evaluate 21bfa07
b87e64a to
3167aebCompareDismissing prior approval to re-evaluate 9a2733c
6eba786 to
aacb560Compare9a2733c to
e9c868aCompareDismissing prior approval to re-evaluate e9c868a
aacb560 to
77e5b36Comparee9c868a to
8163b74Compare77e5b36 to
6bc2561Compareb954b21 to
296e9bbCompare6bc2561 to
71f9ff5Compare296e9bb to
adaf66fCompare71f9ff5 to
8bc20f2Compareadaf66f to
0fcf0f4Compare8bc20f2 to
3f67e2bCompare49b97b4 to
9b6ce56Compare70fdb85 to
5a80908Compare553daf6 to
ed36096Compare2a031a9 to
b63cfb3Compareed36096 to
15aa01aCompareb63cfb3 to
eadf056Comparebd937be to
517c1eaCompare1830060 to
534fad3Compare8d916bc to
7670d78Compare534fad3 to
6601ea3Compare7670d78 to
1ed6271Compare6601ea3 to
6c8a6b1CompareDismissing prior approval to re-evaluate 6c8a6b1
c91fad6 to
9e0c536CompareCo-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
6c8a6b1 to
d0671a3Comparea7d56b3
into
codex/redact-dpop-request-targetUh oh!
There was an error while loading. Please reload this page.
Summary
Validation
vp test run apps/mobile/src/features/cloud/linkEnvironment.test.ts(21 tests)vp run lint:mobilevp check(passes with 20 pre-existing warnings)vp run typecheckOverlap
Note
Medium Risk
Error
_tagvalues and user-visible messages change across link/list/connect/status flows; UI or logging that matched old URL-embedded strings or a singleCloudEnvironmentLinkErrortag needs updating.Overview
Replaces the single
CloudEnvironmentLinkErrorbucket in mobile cloud linking with aSchema.Unionof tagged errors and removes URL-heavy, dev-only, and relay-string message builders.CloudEnvironmentLinkOperationErrornow records anaction, optionalenvironmentId, redacted URL diagnostics viagetUrlDiagnostics(length/protocol/hostname only), nestedrelayError/environmentError, andtraceId, with stable user-facing messages likeCould not {action} for environment "{id}".Mismatch cases use dedicated types (CloudEnvironmentIdMismatchError,CloudEnvironmentEndpointMismatchError,CloudEnvironmentEndpointProviderMismatchError,CloudEnvironmentLocalBearerRequiredError,CloudRelayUrlNotConfiguredError) with expected/actual fields instead of generic strings.Synchronous throws for URL parsing and HTTP client setup are routed through
Effect.tryinto operation errors. Per-environmentstatusErrorstrings now come from these typedmessagegetters. Tests assert secret redaction in serialization and updated_tag/ field shapes;isCloudEnvironmentLinkErrornarrows the union.Reviewed by Cursor Bugbot for commit d0671a3. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Replace generic cloud link errors with structured, action-specific error types in mobile
linkEnvironment.ts:CloudEnvironmentLinkOperationError,CloudRelayUrlNotConfiguredError,CloudEnvironmentLocalBearerRequiredError,CloudEnvironmentIdMismatchError,CloudEnvironmentEndpointMismatchError, andCloudEnvironmentEndpointProviderMismatchError.CloudEnvironmentLinkErrorunion type andisCloudEnvironmentLinkErrorguard so callers can reliably discriminate all link-related failures.linkEnvironmentToCloud,connectRelayManagedEnvironment,listCloudEnvironments, andgetCloudEnvironmentStatusnow emits a different_tagand message format than before; callers matching on previous error shapes will need updating.Macroscope summarized d0671a3.