Skip to content

fix(bankfeeds): Describe V2 partial failures so apps can branch on error.type - #856

Draft
illanonline wants to merge 1 commit into
XeroAPI:masterfrom
illanonline:FWFEED-44954-v2-partial-failure-contract
Draft

illanonline wants to merge 1 commit into
XeroAPI:masterfrom
illanonline:FWFEED-44954-v2-partial-failure-contract

Conversation

@illanonline

@illanonline illanonline commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Updates xero_bankfeeds_v2.yaml (Bank Feeds 2.0) so that partners can branch on error.type to handle a partial failure, without parsing title or detail. This PR stays draft until the matching API changes are ready to release.

Partner-facing change

  • Three recovery actions keyed on error.type:
    • partial-failure-new-account-creation: don't resend. Connect error.accountId with ExistingAccount.
    • partial-failure-new-account-existence-not-confirmed (new, NewAccount): the account may have been created and its id is unknown. Check whether an account named error.accountName exists. Connect it with ExistingAccount if it does, otherwise resend the NewAccount item. If the app involves its user, it can send them back to account selection instead.
    • Any other partial-failure-* type: resend the same item.
  • One 409 rule for create recoveries: feed-already-connected-in-current-organisation on the recovery request means the earlier attempt was recorded.
  • Optional subtype (diagnostics only), and accountId, accountName and connectionId as fields on the error.
  • Item errors no longer have a status property. The item's statusCode is the number (new ItemError schema).
  • Item-level internal-error and too-many-requests (REJECTED, 500), and the 207 Multi-Status wording.
Old type New type
partial-failure-account-created-but-not-connected partial-failure-new-account-creation
partial-failure-migration-can-be-reattempted partial-failure-previous-connection-deletion
partial-failure-connection-created-but-not-recorded partial-failure-connection-creation
partial-failure-delete-can-be-reattempted partial-failure-connection-deletion
REJECTED internal-error with an account-may-exist hint in detail partial-failure-new-account-existence-not-confirmed (new)

Breaking change for Beta partners who match on the renamed types or the NewAccount internal-error hint. V2 is pre-GA.

Based on the up-to-date master (the earlier Bank Feeds V2 spec PR #849 is merged). No manifest.json change is needed, and the version is bumped by semantic-release.

…ror.type

- Replace the four partial-failure types with five that each fix one recovery action: partial-failure-new-account-creation, partial-failure-new-account-existence-not-confirmed, partial-failure-previous-connection-deletion, partial-failure-connection-creation and partial-failure-connection-deletion
- Add optional subtype, and accountId, accountName and connectionId on the error, so apps don't need to read title or detail
- Item errors have no status property; the item's statusCode is the number (new ItemError schema)
- Describe item-level internal-error (REJECTED, 500) and the 207 Multi-Status response

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@illanonline
illanonline force-pushed the FWFEED-44954-v2-partial-failure-contract branch from a88104c to b473683 Compare October 20, 2026 06:34
@illanonline illanonline changed the title fix(bankfeeds): [FWFEED-44954] Sync V2 partial-failure contract fix(bankfeeds): Describe V2 partial failures so apps can branch on error.type Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant