#3848·sure

Bug: Plaid Link error flash never shown — modal just closes

Author: DTTerastarCreated Sep 29, 2026Updated Sep 29, 2026

Before you start (required)

General checklist

  • I have removed personal / sensitive data from screenshots and logs
  • I have searched existing issues and discussions to ensure this is not a duplicate issue

How are you using Sure?

  • I was a paying Maybe customer (hosted version)
  • I use it on PikaPod, Umbrel or similar (VPS included)
  • I am a self-hosted user (local only)

Self hoster checklist

  • Self hosted app commit SHA: 1b105efcc (v0.7.4), also reproduced on v0.7.5-alpha.12
    • I have confirmed that my app's commit is the latest version of Sure — the handler is unchanged on current main
  • Where are you hosting?
    • Docker Compose

Bug description

When Plaid rejects the link_token request, the error message added for #1792 (PR #1991) is never shown. The "add account" modal simply closes and the user gets no feedback. The only trace is in the server log.

In my case the Plaid provider showed "Connected" and the keys were valid; the actual problem was a missing allowed redirect URI:

Plaid link_token request failed: INVALID_FIELD - OAuth redirect URI must be configured in the developer dashboard. See https://plaid.com/docs/#oauth-redirect-uris

Cause

The Link flow is opened inside the modal turbo frame. PlaidItemsController#handle_link_token_error answers HTML requests with redirect_to accounts_path, alert: .... Turbo follows that redirect inside the frame, extracts the layout's empty <turbo-frame id="modal"> from the /accounts response and discards the rest. The flash is consumed by that discarded response, so it never renders, and the modal closes because the frame is now empty.

The existing controller tests pass because they issue plain requests without the Turbo-Frame header.

To Reproduce

  1. Configure Plaid with valid keys but without https://<host>/accounts in Plaid's allowed redirect URIs (any link_token failure works, e.g. a product the Plaid account is not enabled for).
  2. Go to Accounts → add account → Credit Card → Link with Plaid.
  3. GET /plaid_items/new?accountable_type=CreditCard&region=us returns a 302 to /accounts.
  4. The modal closes. No flash is shown.

Expected behavior

The alert is shown to the user, as intended by #1792.

Possible follow-up (not part of the fix)

INVALID_FIELD is not in SHOWABLE_PLAID_ERROR_CODES, so even once the flash is visible, a missing redirect URI produces the generic message rather than Plaid's actionable one. The redirect URI case is pure configuration and a common self-hosting mistake, so it may be worth surfacing.