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
Split expense silently reverts when the workspace's stored tax code doesn't exactly match the code the App sends #99987
Splitting an expense fails for some workspaces. The App applies the split optimistically, the API rejects it, and the App rolls it back — the user sees the original expense reappear with only a generic "An unexpected error occurred" message.
The API returns 404 Tax code not found in policy from SplitTransaction.
Why it happens
The workspace's tax rate is present and enabled, but its stored external tax ID carries a legacy trailing space (for example 40330102 ). The App sends the code without the space, and the backend's split validation compares the two exactly, so the lookup misses and the split is rejected.
The backend comparison is being tracked internally. Two things are App-side:
Worth confirming whether the App can send the tax code exactly as the policy stores it. The App appears to receive an already-normalized copy, in which case this part is purely backend.
The failure surfaces a generic error and silently reverts, with no hint that the tax rate is the problem. The split flow should show an actionable message instead.
Action performed
Use a workspace with Taxes enabled whose stored tax external ID has a trailing space (legacy Expensify Classic data).
Create an expense using that tax rate.
Open the expense > More > Split > Save.
Expected result
The expense splits.
Actual result
A generic error appears and the split reverts to the original expense.
Impact
Small but persistent. Over the last 8 days, roughly 0.2% of split requests carrying a tax code failed this way, across two workspaces. It started on Aug 20, when #94434 began sending an explicit per-split taxCode.
@luacmartins@ishpaul777 I think it's a BE issue (although it was hard for me to reproduce, because I couldn't create a taxCode (externalId) with a trailing space in both ND & OD). But I think MelvinBot found here makes sense to me
The App sends the code without the space, and the backend's split validation compares the two exactly, so the lookup misses and the split is rejected.
@luacmartins I an unsure on how to test this realistically prod, can you check the Slack where this was reported if it has more clear steps (i cant access)
Activity
hoangzinh commentedon Sep 4, 2026
@luacmartins @ishpaul777 I think it's a BE issue (although it was hard for me to reproduce, because I couldn't create a taxCode (externalId) with a trailing space in both ND & OD). But I think MelvinBot found here makes sense to me
Can I request for BE support for this issue?
melvin-bot commentedon Sep 4, 2026
@truph01 Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Sep 5, 2026
@truph01 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
luacmartins commentedon Sep 5, 2026
@ishpaul777 are you avaialble to work on the BE fix?
ishpaul777 commentedon Sep 5, 2026
yes self assigned
ishpaul777 commentedon Sep 5, 2026
Raised PR for review https://github.com/Expensify/Auth/pull/24275
hoangzinh commentedon Sep 11, 2026
How is the BE PR going @ishpaul777
melvin-bot commentedon Sep 14, 2026
@ishpaul777 Eep! 4 days overdue now. Issues have feelings too...
ishpaul777 commentedon Sep 14, 2026
requested retest https://expensify.slack.com/archives/C09V78U42D8/p1789423965560639
m-natarajan commentedon Sep 15, 2026
@ishpaul777 @luacmartins Blocked from retesting this as this requires taxCode (externalId) with a trailing space
luacmartins commentedon Sep 15, 2026
@ishpaul777 QA is blocked on testing this one
ishpaul777 commentedon Sep 15, 2026
@luacmartins I an unsure on how to test this realistically prod, can you check the Slack where this was reported if it has more clear steps (i cant access)
luacmartins commentedon Sep 15, 2026
I requested that the team retest this since it involves a specific customer's data. I'll report back if the fix doesn't work.
melvin-bot commentedon Sep 22, 2026
@ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
ishpaul777 commentedon Sep 22, 2026
@luacmartins any updates
luacmartins commentedon Sep 22, 2026
Not yet. No updates from the customer.
luacmartins commentedon Sep 22, 2026
I think we can consider this done and reopen if we hear otherwise.