ENG-3695: Surface integration save errors under form fields#8092
Merged
Conversation
Server-side secrets validation previously bubbled up as a transient toast that disappeared too quickly to read. Now 422 detail entries are mapped to the offending form field (BigQuery's keyfile_creds, Zendesk's domain, etc.) via parseSecretsFieldErrors and rendered under the field via antd form.setFields. Toasts remain the fallback for non-validation errors.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
…integration-form-errors
lucanovera
approved these changes
May 6, 2026
Contributor
lucanovera
left a comment
There was a problem hiding this comment.
Nice UX improvement! Followed the steps and got the expected outcome. Code changes look good. Approved
Why: orphaned import was tripping the workspace lint job (Clients-Unit) on this PR, since main only runs lint when fides-js files change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket ENG-3695
Description Of Changes
When saving an integration, server-side validation errors from the secrets PATCH (e.g. BigQuery
keyfile_credsJSON parse failures, Zendeskdomainallowed-list checks) used to appear as a transient toast that disappeared too quickly to read. The toast also leaked operator-only guidance (FIDES__SECURITY__DOMAIN_VALIDATION_MODEadvisory) into user-facing text.This PR routes 422 detail entries to the offending form field via antd's
form.setFields, so the error renders directly under the input with a cleaned, human-readable message. Toasts are preserved as the fallback for non-validation errors (network, 500s, unmapped 422s).The fix covers all four places an integration can be created or updated:
ConnectorParameters/ConnectorParametersForm)ConfigureIntegrationForm)JiraConfigTab)Two follow-ups were filed:
locfor model-level secrets validators and split the env-var advisory off the user-facing message so the FE parser doesn't need regex/string-stripping.Code Changes
clients/admin-ui/src/features/common/form/parseSecretsFieldErrors.ts(+ Jest test). Converts a 422detailarray into[{ name, errors }]forform.setFields. Usesloc[-1]when present, falls back to afor '<field>'regex on the message, gated on the field existing in the caller'sknownFields. Strips theValue error,prefix and the env-var advisory tail. ConfigurablenamePrefix(default["secrets"], set to[]for forms whose fields are top-level).ConnectorParameters.tsx:useConnectorForm.handleSubmitre-throws on parsed validation errors so the form can callsetFields; non-mappable errors continue to toast.ConnectorParametersForm.tsx:handleFinishcatches and appliessetFields, short-circuits the post-save mask/property-assignment logic on error.ConfigureIntegrationForm.tsx: both error branches (the connection PATCH that bundles secrets in create flow, and the dedicated secrets PATCH) route tosetFieldsfirst, fall back to existing toasts.JiraConfigTab.tsx:handleSavecatch routes tosetFieldsagainst the four Jira secret fields (namePrefix: []since they're top-level).Steps to Confirm
not valid jsoninto Keyfile creds → click Save. Expect: error appears under the Keyfile creds field; no toast.sfesdfesk.com→ click Save. Expect: error appears under the Domain field, env-var advisory stripped; no toast.Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works