Skip to content

fix: typed errors and complete flows for mobile auth, push and API conflicts - #895

Open
AbdulmujibOladayo wants to merge 1 commit into
rinafcode:mainfrom
AbdulmujibOladayo:fix/abdulmujiboladayo-mobile-error-handling-784-787
Open

fix: typed errors and complete flows for mobile auth, push and API conflicts#895
AbdulmujibOladayo wants to merge 1 commit into
rinafcode:mainfrom
AbdulmujibOladayo:fix/abdulmujiboladayo-mobile-error-handling-784-787

Conversation

@AbdulmujibOladayo

Copy link
Copy Markdown

Adds four small, self-contained modules, one per issue. No existing files are modified, so this merges cleanly alongside the other open PRs.

What's included

Issue Module What it does
#784 src/services/biometricAvailability.ts Classifies why biometric login is unavailable (no hardware / not enrolled / not enabled) and carries it on a typed BiometricUnavailableError, so callers stop showing one generic "not available" dead end.
#785 src/services/pushChannelSetup.ts Retries Android notification channel creation once and hands the failure to a reporter instead of swallowing it. Never throws, so startup stays deliberate.
#786 src/services/sessionInvalidation.ts Runs the full logout sequence after repeated 401s — clear tokens, disconnect socket, navigate to login — continuing past individual step failures and emitting SESSION_INVALIDATED.
#787 src/utils/conflictPayload.ts Parses 409 response bodies into a typed ConflictPayload (server vs client version) that the conflict resolution UI can consume.

Notes

  • Each module is pure and dependency-injected, so it is unit-testable without native modules.
  • Kept deliberately small (each file is under 50 lines) and additive only.

Closes #784
Closes #785
Closes #786
Closes #787

…nflicts

Adds four small, self-contained modules:

- biometricAvailability: classifies why biometric login is unavailable so
  callers get a typed reason instead of one generic "not available" error (rinafcode#784)
- pushChannelSetup: retries Android notification channel creation once and
  reports the failure instead of swallowing it (rinafcode#785)
- sessionInvalidation: runs the full logout sequence (tokens, socket,
  navigation) after repeated 401s, continuing past individual failures (rinafcode#786)
- conflictPayload: parses 409 bodies into a typed payload the conflict
  resolution UI can consume (rinafcode#787)
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@AbdulmujibOladayo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment