You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-05-13] [$250] Travel - Unable to access to travel option, error when accepting Terms and conditions #85944
Please re-state the problem that we are trying to solve in this issue.
When a user enables the Travel feature in Workspace Settings, navigates to Travel > Let's Go, fills in the required data, and accepts the Terms and Conditions, they see "Something went wrong. Please try again later." instead of being redirected to travel.expensify.com.
What is the root cause of that problem?
The error message "Something went wrong. Please try again later." is a generic frontend fallback that surfaces whenever the AcceptSpotnanaTerms API command returns a non-200 jsonCode. The frontend code at src/pages/Travel/TravelTerms.tsx:70-125 correctly handles two specific backend error codes (permissionDenied and additionalVerificationRequired), but any other backend failure falls through to the generic error path.
The flow works as follows:
User accepts terms → acceptSpotnanaTerms() in src/libs/actions/Travel.ts:13-68 fires a side-effect API call (ACCEPT_SPOTNANA_TERMS)
Optimistic data sets TRAVEL_PROVISIONING.isLoading = true and NVP_TRAVEL_SETTINGS.hasAcceptedTerms = true
If the backend returns jsonCode !== 200, the Onyx middleware applies failureData which sets TRAVEL_PROVISIONING.errors to the translation key travel.errorMessage ("Something went wrong. Please try again later.")
The TravelTerms page displays this error via FormAlertWithSubmitButton
Since the frontend error handling is functioning as designed (it correctly surfaces backend failures), the root cause is on the backend — the AcceptSpotnanaTerms command is returning a non-200 response. This could be due to a Spotnana API provisioning failure, an authentication issue, or a backend exception during the travel account setup process.
There is also a secondary bug in the frontend: the failureData in src/libs/actions/Travel.ts does not revert NVP_TRAVEL_SETTINGS.hasAcceptedTerms back to false after a failure. This means after a failed attempt, the user-level hasAcceptedTerms flag stays true, which could cause BookTravelButton (src/components/BookTravelButton.tsx:145-186) to skip the terms screen on retry and go directly to openTravelDotLink() — which would also fail since provisioning never completed.
What changes do you think we should make in order to solve the problem?
Investigate the backend AcceptSpotnanaTerms command to determine why it's returning non-200 responses. The frontend is correctly surfacing the error — the fix needs to happen server-side. Check backend logs for this command to identify whether it's a Spotnana API issue, timeout, or provisioning failure.
Fix the hasAcceptedTerms revert bug in src/libs/actions/Travel.ts: Add NVP_TRAVEL_SETTINGS.hasAcceptedTerms = false to the failureData array so the optimistic update is properly rolled back on failure. This prevents the BookTravelButton from incorrectly skipping the terms page on retry.
Call cleanupTravelProvisioningSession() on generic failure in src/pages/Travel/TravelTerms.tsx (it's currently only called on success and permissionDenied). This ensures stale error state in TRAVEL_PROVISIONING doesn't persist and affect subsequent attempts.
What alternative solutions did you explore? (Optional)
Adding more specific error handling on the frontend for additional backend error codes. However, this only helps if the backend is returning distinguishable error codes — the current evidence suggests the backend is returning a generic non-200 response.
The jsonCode=200 + no spotnanaToken edge case (line 121 of TravelTerms.tsx) could also be a factor — if the backend returns success but without a token, the promise rejects with "No token received" but no error message is shown to the user (since successData was already applied). This would manifest as the user seeing the terms page with no feedback at all, not the "Something went wrong" error.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Travel - Unable to access to travel option, error when accepting Terms and conditions[/-][+][$250] Travel - Unable to access to travel option, error when accepting Terms and conditions[/+]on Mar 20, 2026
I wasn't able to query VictoriaLogs directly (MCP tools unavailable in this environment). Here are the exact queries to run in VMUI to find the backend failure:
Query 1 — Find AcceptSpotnanaTerms calls for this user:
Looking through the logs I don't believe that this is actually happening on Spotnana's production server, only sandbox. I haven't seen any failures in the logs with shouldUseSandbox=false
Please re-state the problem that we are trying to solve in this issue.
When accepting Travel terms and conditions, the user sees "Something went wrong. Please try again later" instead of being redirected to travel.expensify.com.
What is the root cause of that problem?
The primary issue is a backend failure in the AcceptSpotnanaTerms command returning non-200. The frontend correctly surfaces this via failureData in src/libs/actions/Travel.ts.
However, there is a concrete frontend bug that compounds the problem: the failureData does not revert NVP_TRAVEL_SETTINGS.hasAcceptedTerms back to false after failure. The optimistic update sets it to true, but on backend failure it stays true. This causes:
On retry, BookTravelButton (src/components/BookTravelButton.tsx:145-186) sees hasAcceptedTerms === true and skips the terms screen entirely
It goes directly to openTravelDotLink() which also fails since provisioning never completed
The user is stuck with no way to re-accept terms
What changes do you think we should make in order to solve the problem?
Two changes in src/libs/actions/Travel.ts:
1. Revert hasAcceptedTerms on failure:
Add to the failureData array:
2. Call cleanupTravelProvisioningSession() on generic failure:
In src/pages/Travel/TravelTerms.tsx, the cleanup function is called on success and permissionDenied but not on the generic error path. Add cleanup there too so stale TRAVEL_PROVISIONING error state doesn't persist across retry attempts.
These are concrete frontend fixes that make the retry flow work correctly regardless of whether the backend issue is resolved separately.
What alternative solutions did you explore? (Optional)
Only fixing backend — Correct long-term, but the frontend revert bug exists independently and should be fixed regardless.
Adding a "retry" button on the error screen — Helps UX but doesn't fix the root cause of hasAcceptedTerms being stuck at true.
@shubham1206agra The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Go to a workspace with Travel enabled (or create one and enable Travel under More Features)
Tap Travel in the workspace menu, then tap Let's Go
Fill in the required info and reach the Terms and Conditions screen
Accept the terms — if the API call fails (you can simulate by going offline right after tapping accept, or by intercepting the AcceptSpotnanaTerms request to return an error), verify:
The error message "Something went wrong. Please try later" appears
hasAcceptedTerms is reverted to false (check Onyx state or verify that tapping Book Travel from the workspace again brings you back to the terms screen, not straight to openTravelDotLink)
Retry accepting terms — verify the flow works correctly on success
Activity
MelvinBot commentedon Mar 20, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user enables the Travel feature in Workspace Settings, navigates to Travel > Let's Go, fills in the required data, and accepts the Terms and Conditions, they see "Something went wrong. Please try again later." instead of being redirected to travel.expensify.com.
What is the root cause of that problem?
The error message "Something went wrong. Please try again later." is a generic frontend fallback that surfaces whenever the
AcceptSpotnanaTermsAPI command returns a non-200jsonCode. The frontend code atsrc/pages/Travel/TravelTerms.tsx:70-125correctly handles two specific backend error codes (permissionDeniedandadditionalVerificationRequired), but any other backend failure falls through to the generic error path.The flow works as follows:
acceptSpotnanaTerms()insrc/libs/actions/Travel.ts:13-68fires a side-effect API call (ACCEPT_SPOTNANA_TERMS)TRAVEL_PROVISIONING.isLoading = trueandNVP_TRAVEL_SETTINGS.hasAcceptedTerms = truejsonCode !== 200, the Onyx middleware appliesfailureDatawhich setsTRAVEL_PROVISIONING.errorsto the translation keytravel.errorMessage("Something went wrong. Please try again later.")TravelTermspage displays this error viaFormAlertWithSubmitButtonSince the frontend error handling is functioning as designed (it correctly surfaces backend failures), the root cause is on the backend — the
AcceptSpotnanaTermscommand is returning a non-200 response. This could be due to a Spotnana API provisioning failure, an authentication issue, or a backend exception during the travel account setup process.There is also a secondary bug in the frontend: the
failureDatainsrc/libs/actions/Travel.tsdoes not revertNVP_TRAVEL_SETTINGS.hasAcceptedTermsback tofalseafter a failure. This means after a failed attempt, the user-levelhasAcceptedTermsflag staystrue, which could causeBookTravelButton(src/components/BookTravelButton.tsx:145-186) to skip the terms screen on retry and go directly toopenTravelDotLink()— which would also fail since provisioning never completed.What changes do you think we should make in order to solve the problem?
Investigate the backend
AcceptSpotnanaTermscommand to determine why it's returning non-200 responses. The frontend is correctly surfacing the error — the fix needs to happen server-side. Check backend logs for this command to identify whether it's a Spotnana API issue, timeout, or provisioning failure.Fix the
hasAcceptedTermsrevert bug insrc/libs/actions/Travel.ts: AddNVP_TRAVEL_SETTINGS.hasAcceptedTerms = falseto thefailureDataarray so the optimistic update is properly rolled back on failure. This prevents theBookTravelButtonfrom incorrectly skipping the terms page on retry.Call
cleanupTravelProvisioningSession()on generic failure insrc/pages/Travel/TravelTerms.tsx(it's currently only called on success andpermissionDenied). This ensures stale error state inTRAVEL_PROVISIONINGdoesn't persist and affect subsequent attempts.What alternative solutions did you explore? (Optional)
jsonCode=200 + no spotnanaTokenedge case (line 121 of TravelTerms.tsx) could also be a factor — if the backend returns success but without a token, the promise rejects with "No token received" but no error message is shown to the user (sincesuccessDatawas already applied). This would manifest as the user seeing the terms page with no feedback at all, not the "Something went wrong" error.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.melvin-bot commentedon Mar 20, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (
External)melvin-bot commentedon Mar 20, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022034983964972386025
[-]Travel - Unable to access to travel option, error when accepting Terms and conditions[/-][+][$250] Travel - Unable to access to travel option, error when accepting Terms and conditions[/+]stitesExpensify commentedon Mar 20, 2026
@MelvinBot look at the logs for applausetester+lov0001@applause.expensifail.com and try to find why acceptSpotnanaTerms actually failed
MelvinBot commentedon Mar 20, 2026
I wasn't able to query VictoriaLogs directly (MCP tools unavailable in this environment). Here are the exact queries to run in VMUI to find the backend failure:
Query 1 — Find AcceptSpotnanaTerms calls for this user:
Run in VMUI
Query 2 — Broader spotnana search for this user:
Run in VMUI
Query 3 — AcceptSpotnanaTerms errors across all users (to see if systemic):
Run in VMUI
Query 4 — Auth stream for Spotnana backend errors:
Run in VMUI
What to look for:
jsonCodein the response (anything ≠ 200 triggers the generic error)request_idto trace the full request lifecycle across web + auth streamsTime range: last 30 days (2026-02-18 to 2026-03-20). If you find a
request_id, queryrequest_id:=<value>across all streams to get the full picture.stitesExpensify commentedon Mar 20, 2026
Looking through the logs I don't believe that this is actually happening on Spotnana's production server, only sandbox. I haven't seen any failures in the logs with
shouldUseSandbox=falsestitesExpensify commentedon Mar 20, 2026
Asked spotnana here https://expensify.slack.com/archives/C066REXJ9D3/p1774020446250829
arlo-owls commentedon Mar 20, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When accepting Travel terms and conditions, the user sees "Something went wrong. Please try again later" instead of being redirected to travel.expensify.com.
What is the root cause of that problem?
The primary issue is a backend failure in the
AcceptSpotnanaTermscommand returning non-200. The frontend correctly surfaces this viafailureDatainsrc/libs/actions/Travel.ts.However, there is a concrete frontend bug that compounds the problem: the
failureDatadoes not revertNVP_TRAVEL_SETTINGS.hasAcceptedTermsback tofalseafter failure. The optimistic update sets it totrue, but on backend failure it staystrue. This causes:BookTravelButton(src/components/BookTravelButton.tsx:145-186) seeshasAcceptedTerms === trueand skips the terms screen entirelyopenTravelDotLink()which also fails since provisioning never completedWhat changes do you think we should make in order to solve the problem?
Two changes in
src/libs/actions/Travel.ts:1. Revert
hasAcceptedTermson failure:Add to the
failureDataarray:2. Call
cleanupTravelProvisioningSession()on generic failure:In
src/pages/Travel/TravelTerms.tsx, the cleanup function is called on success andpermissionDeniedbut not on the generic error path. Add cleanup there too so staleTRAVEL_PROVISIONINGerror state doesn't persist across retry attempts.These are concrete frontend fixes that make the retry flow work correctly regardless of whether the backend issue is resolved separately.
What alternative solutions did you explore? (Optional)
hasAcceptedTermsbeing stuck attrue.Contributor details
Upwork Profile Link: https://www.upwork.com/freelancers/~0110238ea7fec0963b
33 remaining items
melvin-bot commentedon May 6, 2026
@shubham1206agra The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
stitesExpensify commentedon May 12, 2026
Not overdue, payment is tomorrow
melvin-bot commentedon May 12, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)shubham1206agra commentedon May 13, 2026
BugZero Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: https://github.com/Expensify/App/pull/55300/changes#r3235986259
Link to the comment on the Issue: [$250] [HOLD for payment 2025-02-17] [CRITICAL] Add dropdown to allow users to choose which domain their travel should be provisioned under in NewDot #55377 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/637577
Regression Test Proposal
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-ef24-ac40-bb4b-323b9b9d3074melvin-bot commentedon May 13, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon May 15, 2026
Payment Summary
Contributor+: @shubham1206agra due $250 via NewDot
Assuming payment is due even thought I see
Revertall over the issue and PRJmillsExpensify commentedon Jun 8, 2026
$250 approved for @shubham1206agra