From 2b26da360e27d3c95ef19bc088840dc8984e0541 Mon Sep 17 00:00:00 2001
From: Danny White <3104761+dnywh@users.noreply.github.com>
Date: Mon, 3 Aug 2026 09:43:23 +1000
Subject: [PATCH 1/6] show API and AWS authorization errors inline (#48471)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## What kind of change does this PR introduce?
Bug fix and design-system update.
## What is the current behavior?
API authorisation and AWS Marketplace action failures use transient
toasts. The inline action-error treatment introduced for organisation
invitations is implemented locally.
## What is the new behavior?
Action failures remain visible below their actions and clear on retry or
organisation change.
This PR adds a shared `InterstitialActionError` component, updates the
connect-interstitial guidance and demo to use it, and retroactively
applies it to `OrganizationInvite`.
Mutation errors are read directly from their mutation hooks rather than
copied into component state.
| Before | After |
| --- | --- |
| | |
| | |
_Note since taking that AWS screenshot: the error message now replaces
the prior footer text. I.e. “Learn more about billing through AWS.” is
now gone when an error message is present._
## To test
### AWS Marketplace
For a visual check with local Studio running:
1. In
`apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceOnboarding.tsx`,
immediately before `if (!buyerId)`, temporarily add:
```tsx
return (
)
```
2. Open `http://localhost:8082/aws-marketplace-onboarding?buyer_id=test`
while signed in.
3. Confirm the error appears below **Link organization** with a divider.
Remove the temporary return before committing anything.
### API authorization
For a visual check with local Studio running:
1. In
`apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Valid.tsx`,
immediately before `if (isLoading)`, temporarily add:
```tsx
return (
undefined}
onApprove={() => undefined}
onDecline={() => undefined}
/>
)
```
2. Open `http://localhost:8082/authorize?auth_id=test` while signed in.
3. Confirm the error appears below the authorisation actions with a
divider.
Remove the temporary return before committing anything.
## Summary by CodeRabbit
* **New Features**
* Added consistent inline error messaging for authorization,
organization invitations, and AWS Marketplace onboarding.
* Error messages now appear within the relevant interstitial and replace
supporting footer content until resolved.
* Retry and action buttons remain available after failed operations.
* **Bug Fixes**
* AWS Marketplace linking failures no longer trigger toast
notifications.
* Billing guidance is hidden while an onboarding error is displayed.
* **Tests**
* Added coverage for authorization, cancellation, and AWS Marketplace
failure states.
---------
Co-authored-by: Joshen Lim
---
.../ui-patterns/connect-interstitials.mdx | 14 +--
.../connect-interstitial-action-error.tsx | 7 +-
.../example/connect-interstitial-shared.tsx | 12 +++
.../ApiAuthorization.Form.tsx | 19 +++-
.../ApiAuthorization.Valid.tsx | 41 ++++++---
.../AwsMarketplaceOnboarding.tsx | 90 ++++++++++++-------
.../OrganizationInvite/OrganizationInvite.tsx | 11 +--
.../components/layouts/InterstitialLayout.tsx | 12 +++
.../components/ApiAuthorization.test.tsx | 38 ++++++++
.../pages/aws-marketplace-onboarding.test.tsx | 27 ++++++
10 files changed, 203 insertions(+), 68 deletions(-)
diff --git a/apps/design-system/content/docs/ui-patterns/connect-interstitials.mdx b/apps/design-system/content/docs/ui-patterns/connect-interstitials.mdx
index 99c0671ea699e..4457f7ef69cbe 100644
--- a/apps/design-system/content/docs/ui-patterns/connect-interstitials.mdx
+++ b/apps/design-system/content/docs/ui-patterns/connect-interstitials.mdx
@@ -217,20 +217,14 @@ Match feedback to its scope:
feedback for a failure the user needs to resolve on the current card.
```tsx
-{
- actionError && (
-
-
- {actionError}
-
-
- )
-}
+
```
Clear stale action feedback when the user retries or changes a relevant
selection. Error copy should say what failed and, when it is not obvious, what
-the user can do next.
+the user can do next. When passive supporting copy occupies the same footer
+region, replace it with the action error until the error is cleared instead of
+stacking both messages.
Cancel
-
-
- Failed to authorize Stripe Projects. Please try again.
-