[PR #6476] Fix YNAB import failure with empty payee names #6553

Closed
opened 2026-02-28 21:29:56 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6476

State: closed
Merged: No


YNAB exports can contain transactions with empty payee fields. When importing these budgets, the import fails with a generic "unknown" error because createPayee() requires a non-empty name field, throwing a ValidationError that bubbles up uncaught.

Changes

  • Skip importing payees with empty/null names in importPayees() for both YNAB4 and YNAB5 importers
  • Normalize empty imported_payee values to null in transaction mapping to prevent storing empty strings

Transactions referencing skipped payees will have payee: null, which the transaction import system already handles correctly.

// Before: would attempt to create payee and fail
for (const payee of data.payees) {
  if (!payee.deleted) {
    await actual.createPayee({ name: payee.name });
  }
}

// After: skip invalid payees
for (const payee of data.payees) {
  if (!payee.deleted && payee.name && payee.name.trim() !== '') {
    await actual.createPayee({ name: payee.name });
  }
}
Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug]: Empty payee field prevents import</issue_title>
<issue_description>### Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

My nYNAB import was failing with the message "unknown" and no other info. After much troubleshooting I found that I had a very old transaction that had the payee name in the memo field and nothing in the payee field. Once I swapped those the import completed successfully.

How can we reproduce the issue?

Attempt an nYNAB import with a blank payee name on a transaction.

Tested on Docker version 25.12.0 and https://app.actualbudget.org/.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Chrome

Operating System

Mac OSX</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6476 **State:** closed **Merged:** No --- YNAB exports can contain transactions with empty payee fields. When importing these budgets, the import fails with a generic "unknown" error because `createPayee()` requires a non-empty name field, throwing a `ValidationError` that bubbles up uncaught. **Changes** - Skip importing payees with empty/null names in `importPayees()` for both YNAB4 and YNAB5 importers - Normalize empty `imported_payee` values to `null` in transaction mapping to prevent storing empty strings Transactions referencing skipped payees will have `payee: null`, which the transaction import system already handles correctly. ```typescript // Before: would attempt to create payee and fail for (const payee of data.payees) { if (!payee.deleted) { await actual.createPayee({ name: payee.name }); } } // After: skip invalid payees for (const payee of data.payees) { if (!payee.deleted && payee.name && payee.name.trim() !== '') { await actual.createPayee({ name: payee.name }); } } ``` <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>[Bug]: Empty payee field prevents import</issue_title> > <issue_description>### Verified issue does not already exist? > > - [x] I have searched and found no existing issue > > ### What happened? > > My nYNAB import was failing with the message "unknown" and no other info. After much troubleshooting I found that I had a very old transaction that had the payee name in the memo field and nothing in the payee field. Once I swapped those the import completed successfully. > > ### How can we reproduce the issue? > > Attempt an nYNAB import with a blank payee name on a transaction. > > Tested on Docker version 25.12.0 and https://app.actualbudget.org/. > > ### Where are you hosting Actual? > > Docker > > ### What browsers are you seeing the problem on? > > Chrome > > ### Operating System > > Mac OSX</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes actualbudget/actual#6441 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
GiteaMirror added the pull-request label 2026-02-28 21:29:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6553