Skip to content

FIX: show initializer create errors inside the open dialog - #2370

Merged
hannahwestra25 merged 2 commits into
microsoft:mainfrom
hannahwestra25:hannahwestra25-fix-initializer-create-errors-in-dialog
Aug 13, 2026
Merged

FIX: show initializer create errors inside the open dialog#2370
hannahwestra25 merged 2 commits into
microsoft:mainfrom
hannahwestra25:hannahwestra25-fix-initializer-create-errors-in-dialog

Conversation

@hannahwestra25

Copy link
Copy Markdown
Contributor

Description

When POST /api/initializers/settings rejects a create request, the error was only shown on the page behind the modal. Now the error is surfaced inside the active dialog via an externalError prop on InitializerParametersDialog.

  • Change onAdd return type from Promise to Promise<{ added: boolean; error?: string }> so the error message propagates back to the dialog layer
  • Add externalError prop to InitializerParametersDialog to display server errors alongside validation errors
  • Add addError state in AdditionalInitializers to track and clear server errors
  • Add tests for both the dialog prop and the integration flow

Fixes #2346

Comment thread frontend/src/components/Initializers/AdditionalInitializers.tsx Outdated
Comment thread frontend/src/components/Initializers/AdditionalInitializers.tsx Outdated
@hannahwestra25
hannahwestra25 force-pushed the hannahwestra25-fix-initializer-create-errors-in-dialog branch 2 times, most recently from ddc0f82 to d19886f Compare August 13, 2026 15:27
When POST /api/initializers/settings rejects a create request, the error
was only shown on the page behind the modal. Now the error is surfaced
inside the active dialog via an externalError prop on
InitializerParametersDialog.

- Change onAdd return type from Promise<boolean> to
  Promise<{ added: boolean; error?: string }> so the error message
  propagates back to the dialog layer
- Add externalError prop to InitializerParametersDialog to display
  server errors alongside validation errors
- Add addError state in AdditionalInitializers to track and clear
  server errors
- Add tests for both the dialog prop and the integration flow

Fixes microsoft#2346

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@hannahwestra25
hannahwestra25 force-pushed the hannahwestra25-fix-initializer-create-errors-in-dialog branch from d19886f to 61e8445 Compare August 13, 2026 15:42
@hannahwestra25
hannahwestra25 added this pull request to the merge queue Aug 13, 2026
Merged via the queue into microsoft:main with commit e507156 Aug 13, 2026
47 checks passed
@hannahwestra25
hannahwestra25 deleted the hannahwestra25-fix-initializer-create-errors-in-dialog branch August 13, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GUI] Show initializer create errors inside the open dialog

3 participants