From a87c3ae9957737af2b6973c20c7fe80db7d7cb26 Mon Sep 17 00:00:00 2001 From: Dion Low Date: Mon, 27 Apr 2026 18:32:41 -0500 Subject: [PATCH] fix(InstallWizard): surface structured API errors on install creation The Review step's create-installation onError handler called setSubmissionError(error.message), which only contains the SDK's generic "Response returned an error code" string. The standardized API problem document (with causes / detail / remedy) was discarded, so users hit errors like "1 destination(s) not found: [testWebhook]" but only saw the generic message. Route the install error through handleServerError(), the existing project-wide utility (already used in Configure, ConnectionsContextProvider, InstallIntegrationContextProvider, UninstallButton, etc.) that parses the problem-document body and joins causes / falls back to detail / appends remedy. This brings the InstallWizard in line with the rest of the codebase's error-handling pattern. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/InstallWizard/steps/ReviewStep.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/InstallWizard/steps/ReviewStep.tsx b/src/components/InstallWizard/steps/ReviewStep.tsx index 27858877..a4e72f71 100644 --- a/src/components/InstallWizard/steps/ReviewStep.tsx +++ b/src/components/InstallWizard/steps/ReviewStep.tsx @@ -8,6 +8,7 @@ import { useLocalConfig, useManifest, } from "src/headless"; +import { handleServerError } from "src/utils/handleServerError"; import { StepHeader } from "../components/StepHeader"; import { useWizard } from "../wizard/WizardContext"; @@ -102,7 +103,7 @@ export function ReviewStep() { nextStep(); }, onError: (error) => { - setSubmissionError(error.message); + handleServerError(error, setSubmissionError); }, }); }, [