Problem
The Search page surfaces a Pay button for closed expense reports on personal policies and deleted policies, even though paying such reports always fails server-side with a 406 Unsupported policy type for this action error.
Auth's guard at PayMoneyRequest.cpp:254 correctly rejects these payments because:
- Policy type is not
corporate or team (personal policy), OR
- Policy has been deleted (NVP renamed to
private_expensify_DELETED_policy{ID}), causing Policy::getType() to return an empty string
This means users can initiate a batch-pay from Search (PayMoneyRequestOnSearch) that silently fails, with the error embedded in the Onyx snapshot update rather than surfaced as a clear UI message.
Root Cause
canIOUBePaid contains an isPaidGroupPolicy check, but there appears to be a stale-snapshot path through the negative-amount "Mark as paid Elsewhere" flow in Search that bypasses this gate and still renders the Pay action.
Related server-side issue: Expensify/Expensify#619510
Expected Behavior
The Pay action should not be shown in Search for expense reports on:
- Personal policies
- Deleted policies
Actual Behavior
The Pay button is shown and when tapped it results in a silent failure (406 from server), giving users no clear feedback about why the action cannot be completed.
Version
Reproduced on 9.3.78-1 (latest as of May 2026)
Problem
The Search page surfaces a Pay button for closed expense reports on personal policies and deleted policies, even though paying such reports always fails server-side with a
406 Unsupported policy type for this actionerror.Auth's guard at
PayMoneyRequest.cpp:254correctly rejects these payments because:corporateorteam(personal policy), ORprivate_expensify_DELETED_policy{ID}), causingPolicy::getType()to return an empty stringThis means users can initiate a batch-pay from Search (
PayMoneyRequestOnSearch) that silently fails, with the error embedded in the Onyx snapshot update rather than surfaced as a clear UI message.Root Cause
canIOUBePaidcontains anisPaidGroupPolicycheck, but there appears to be a stale-snapshot path through the negative-amount "Mark as paid Elsewhere" flow in Search that bypasses this gate and still renders the Pay action.Related server-side issue: Expensify/Expensify#619510
Expected Behavior
The Pay action should not be shown in Search for expense reports on:
Actual Behavior
The Pay button is shown and when tapped it results in a silent failure (406 from server), giving users no clear feedback about why the action cannot be completed.
Version
Reproduced on
9.3.78-1(latest as of May 2026)