Skip to content

[Sentry: APP-H08] Crash toggling Sage Intacct default vendor when vendors list is empty #95342

Description

@mountiny

Sentry

https://expensify.sentry.io/issues/APP-H08

Impact (snapshot at filing)

  • Users (total since first seen): 1
  • Events: 3
  • Users (last 14d): 1
  • First seen: 2026-07-03
  • Last seen: 2026-07-03 (ongoing)
  • Platform: web
  • App version(s): 9.4.25-2
  • Affected route(s) (parameterized): /workspaces/:policyID/accounting/sage-intacct/export/reimbursable
  • Mechanism: auto.browser.browserapierrors.requestAnimationFrame

Stack trace (top frames, first-party only)

Switch.tsx:75 (<anonymous>) → onToggle(!isOn)
ToggleSettingsOptionRow.tsx:240 (t16) → onToggle(isOn)
SageIntacctReimbursableExpensesPage.tsx:83 (menuItems.onToggle) → vendors?.[0].id

Suspected cause

Optional chaining stops at vendors?.[0]; when the vendors array is empty, [0] is undefined and accessing .id throws. Same pattern exists on the non-reimbursable export page.

Reproduction

  1. Connect a workspace to Sage Intacct with an empty vendors list (or before vendors sync completes).
  2. Navigate to Accounting → Sage Intacct → Export → Reimbursable expenses.
  3. Toggle "Default vendor" ON.
  4. Observe TypeError in console: Cannot read properties of undefined (reading 'id').

Related

  • Sibling Sentry IDs (if any): none
  • Prior GH issues: none
  • Fix PR: pending

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions