fix(auth): convert stolen lock AbortError when acquireTimeout is 0 - #2615
fix(auth): convert stolen lock AbortError when acquireTimeout is 0#2615abhaysahu1008 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
Walkthrough
Possibly related issues
Merge Risk: ⚪ Minimal · up to This localized change adjusts lock error handling for a zero timeout, and no actionable merge-blocking risk remains after normal checks and review. 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 |
🔍 Description
What changed?
Removed the
acquireTimeout > 0condition inside theAbortErrorcatch/check block withinnavigatorLock(packages/core/auth-js/src/lib/locks.ts).Why was this change needed?
When
acquireTimeoutis set to0(such as in_autoRefreshTokenTick), stolen Web Locks produce anAbortError. Previously, becauseacquireTimeout > 0was required to process theAbortError, stolen locks bypassed error handling whenacquireTimeoutwas0. This caused unhandled rawAbortErrorexceptions to leak to client application error trackers (e.g., Sentry) instead of properly resolving or throwing a structuredNavigatorLockAcquireTimeoutError.How was it tested?
npx nx test auth-js -- test/lib/locks.test.tslocks.test.ts).npx nx format:writeto ensure code style compliance.Closes supabase/supabase#49113