fix(12-04): align setup config client to camelCase API contract + readable errors

BUG 1: Rename SetupConfigPayload fields from snake_case to camelCase to match
the API configSchema (appExternalUrl, oidcIssuer, oidcClientId, vapidPublicKey).
Update SetupPage.tsx handleSaveAndValidate to send the correct camelCase keys.

BUG 2: Extract human-readable message from ZodError object in postSetupConfig
error handler. When body.error is an object with issues[], use issues[0].message
instead of stringifying the object (which produces "[object Object]").

All 245 PWA tests pass; TypeScript clean.
This commit is contained in:
Lucas Berger
2026-06-15 14:48:07 -04:00
parent 9f20c8b7cc
commit 120ce85a59
2 changed files with 31 additions and 10 deletions
+4 -4
View File
@@ -502,10 +502,10 @@ function Step2Config({ onBack, onSuccess, stepHeadingRef }: Step2Props) {
}
configMutation.mutate({
app_url: appUrl.trim(),
oidc_issuer: oidcIssuer.trim(),
oidc_client_id: oidcClientId.trim(),
vapid_public_key: vapidPublicKey.trim(),
appExternalUrl: appUrl.trim(),
oidcIssuer: oidcIssuer.trim(),
oidcClientId: oidcClientId.trim(),
vapidPublicKey: vapidPublicKey.trim(),
});
}