Bug: Generic "Unexpected error" shown instead of re-authentication when auth token expires during expense split
Slack thread: https://expensify.slack.com/archives/C049HHMV9SM/p1778034168209899
Description
When a user's auth token expires while they are actively using the app, API write commands (e.g., splitting an expense) fail with a generic "Unexpected error submitting this expense. Please try again later." message. The server returns jsonCode 407 (AuthTokenExpired), but the App does not detect this and does not trigger the ReauthenticateSession flow. The user appears fully logged in and can browse cached data, but all API writes silently fail.
Steps to Reproduce
- Log into NewDot web with an active session
- Wait for auth token to expire naturally (or let session sit idle)
- Open a report and select an expense
- Attempt to split the expense
- Observe the generic error message
- Retry — same result
Expected Behavior
The App should detect the 407 AuthTokenExpired response, automatically trigger ReauthenticateSession to refresh the token, and either retry the operation transparently or prompt the user to sign in again with the server's actual error message.
Actual Behavior
The App displays "Unexpected error submitting this expense. Please try again later." — it does not surface the real error (AuthTokenExpired) and does not trigger the auto-reauthentication flow. The user appears logged in and can browse cached data, but ALL API write commands fail with 407. In the observed case, this persisted for ~9 minutes until a full Authenticate eventually fired (no ReauthenticateSession was ever triggered).
Log Evidence
- First attempt: request_id 9f74508e2ca27e99-BOS (01:47 UTC, 2026-05-06)
- Second attempt: request_id 9f7455822c1c7e99-SJC (01:50 UTC, 2026-05-06)
- Both returned jsonCode 407, AuthTokenExpired
- During the 01:40–01:59 UTC window, virtually every API command (OpenReport, Search, PusherPing, AuthenticatePusher, Transaction_Split) was returning 407
Platform
Web (v9.3.66-7)
Possibly Related Issues
Bug: Generic "Unexpected error" shown instead of re-authentication when auth token expires during expense split
Slack thread: https://expensify.slack.com/archives/C049HHMV9SM/p1778034168209899
Description
When a user's auth token expires while they are actively using the app, API write commands (e.g., splitting an expense) fail with a generic "Unexpected error submitting this expense. Please try again later." message. The server returns jsonCode 407 (AuthTokenExpired), but the App does not detect this and does not trigger the
ReauthenticateSessionflow. The user appears fully logged in and can browse cached data, but all API writes silently fail.Steps to Reproduce
Expected Behavior
The App should detect the 407 AuthTokenExpired response, automatically trigger
ReauthenticateSessionto refresh the token, and either retry the operation transparently or prompt the user to sign in again with the server's actual error message.Actual Behavior
The App displays "Unexpected error submitting this expense. Please try again later." — it does not surface the real error (AuthTokenExpired) and does not trigger the auto-reauthentication flow. The user appears logged in and can browse cached data, but ALL API write commands fail with 407. In the observed case, this persisted for ~9 minutes until a full
Authenticateeventually fired (noReauthenticateSessionwas ever triggered).Log Evidence
Platform
Web (v9.3.66-7)
Possibly Related Issues