Skip to content

20260928 - Show the server's reason when the contact step is refused - #103

Merged
Purple10101 merged 1 commit into
mainfrom
20260928-contact-step-refusal-message
Sep 28, 2026
Merged

Purple10101 merged 1 commit into
mainfrom
20260928-contact-step-refusal-message

Conversation

@Purple10101

Copy link
Copy Markdown
Collaborator

What

The wizard's Contact details step showed "Could not save. Check the connection and try again." for every refusal, including a bad country code such as U or G1, instead of the server's own message.

Why

postJSON in static/setup.js rejects on any non-2xx response and dropped the server's per-field errors. So the step's !data.success branch never ran, and every 400 fell through to the connection-error catch.

Fix

  • failure() now attaches the response's errors to the rejected error.
  • The contact step's catch shows the first one, and falls back to the connection message only when there is none.

This is the same fix #102 applies to the new claim step. The postJSON change is identical in both PRs, so they merge cleanly in either order.

Testing

🤖 Generated with Claude Code

postJSON rejects on any non-2xx response and dropped the per-field errors,
so the contact step's refusal branch never ran and a bad country code (such
as a single letter) read as a connection failure. The rejected error now
carries the errors, and the contact step shows the first one.

The postJSON change is identical to the one in #102, so the two merge
cleanly in either order.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Purple10101
Purple10101 merged commit e69957d into main Sep 28, 2026
3 checks passed
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