Skip to content

Domain settings: report a failed removal - #299

Merged
Musiker15 merged 2 commits into
mainfrom
fix/domain-remove-errors
Oct 29, 2026
Merged

Musiker15 merged 2 commits into
mainfrom
fix/domain-remove-errors

Conversation

@Musiker15

Copy link
Copy Markdown
Member

Problem

remove() in domain-form.tsx didn't look at the response of DELETE /api/guilds/[guildId]/domain. On a 4xx or 5xx it still cleared the field, closed the confirm dialog and refreshed the page. Nothing said that the domain was still there.

Fix

  • Check res.ok. On failure throw with the API's error or the new errRemove text.
  • The dialog stays open and shows the reason through ConfirmDialog's error prop, so the owner can retry or cancel. Closing the dialog clears the message.
  • errRemove in all seven languages.

Checked

  • pnpm --filter @msk-forms/web typecheck, eslint and prettier on the changed files.
  • No component test setup in apps/web, so this UI path has no test.

remove() in the domain form ignored the response: a failed DELETE
cleared the field, closed the dialog and refreshed, so it looked as if
the domain was gone while it was still configured.

The response is checked now. On failure the dialog stays open and shows
the reason (the API's message, or "Could not remove the domain."), so
the owner can retry or cancel.
@Musiker15
Musiker15 merged commit e37237a into main Oct 29, 2026
4 checks passed
@Musiker15
Musiker15 deleted the fix/domain-remove-errors branch October 29, 2026 06:15
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.

1 participant