Catch and show proxy error during sign in - #411
Conversation
|
Warning Review limit reached
Next review available in: 32 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds an identity-provider health endpoint and client-side reachability checks. Avatar and landing-page sign-in actions now show an error toast and skip authentication when the identity provider is unreachable. ChangesIdentity-provider sign-in availability
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant SignInEntryPoint
participant useIdpHealth
participant HealthEndpoint
participant IdentityProvider
participant ToastService
participant signIn
User->>SignInEntryPoint: Select login
SignInEntryPoint->>useIdpHealth: checkIdpReachable(toast)
useIdpHealth->>HealthEndpoint: Fetch /flame/api/health
HealthEndpoint->>IdentityProvider: Request OpenID configuration
IdentityProvider-->>HealthEndpoint: Reachability response
HealthEndpoint-->>useIdpHealth: Health result
alt Identity provider reachable
useIdpHealth-->>SignInEntryPoint: true
SignInEntryPoint->>signIn: Start authentication
else Identity provider unreachable
useIdpHealth->>ToastService: Show sign-in failure toast
useIdpHealth-->>SignInEntryPoint: false
end
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@server/routes/flame/api/health.get.ts`:
- Around line 36-38: Update the health endpoint’s error return after
describeFetchError(error) so it keeps the detailed message and error only in
console.error, while returning a fixed user-safe error message instead of the
raw upstream diagnostic. Preserve the existing reachable: false response shape.
- Around line 19-33: Update the discovery request flow around the fetch response
to capture response.ok and response.status, then await response.body?.cancel()
before either success or failure return. Preserve the existing status warning
and reachable/error results while ensuring the response body is canceled on both
branches.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4b377d3b-2940-44cc-aab5-506008f2b3b2
📒 Files selected for processing (5)
app/components/header/AvatarButton.vueapp/components/landing/IdpAuthBtns.vueapp/composables/connectionErrorToast.tsapp/composables/useIdpHealth.tsserver/routes/flame/api/health.get.ts
Summary by CodeRabbit
New Features
Bug Fixes