fix(forms): replace developer-facing status strings with user messages (MAPPS-282) #290

Merged
YousifShkara merged 1 commit from fix/MAPPS-282-422-inline-field-errors into main 2026-06-21 07:06:06 +02:00
Owner

The string-error helpers' last-resort branch returned "Request failed with status: 422" verbatim when the server hit a non-2xx without a parseable ErrorResponse envelope - the exact developer-facing banner the QA report flagged on the Contact form. Route the fallback through a user_friendly_status(code) helper that maps 400 / 401 / 403 / 404 / 409 / 422 / 429 / 5xx to a tasteful per-class message; the _typed helpers already do this via ApiError::user_message, so the migrated forms (Contact, Ticket create, Project) are unaffected. The many legacy callers that still use post_authed / put_authed (ticket inline edits, asset save, contract / billing / settings handlers) now show "Validation failed. Please check the form fields." on a bodyless 422 instead of a raw status string.

A complete per-field 422 mapping for every legacy form is a separate, larger migration to the _typed API surface; tracked as a follow-up. This change captures the user-visible win (no more developer-facing status banners) without that churn.

#MAPPS-282

The string-error helpers' last-resort branch returned \"Request failed with status: 422\" verbatim when the server hit a non-2xx without a parseable `ErrorResponse` envelope - the exact developer-facing banner the QA report flagged on the Contact form. Route the fallback through a `user_friendly_status(code)` helper that maps 400 / 401 / 403 / 404 / 409 / 422 / 429 / 5xx to a tasteful per-class message; the `_typed` helpers already do this via `ApiError::user_message`, so the migrated forms (Contact, Ticket create, Project) are unaffected. The many legacy callers that still use `post_authed` / `put_authed` (ticket inline edits, asset save, contract / billing / settings handlers) now show \"Validation failed. Please check the form fields.\" on a bodyless 422 instead of a raw status string. A complete per-field 422 mapping for every legacy form is a separate, larger migration to the `_typed` API surface; tracked as a follow-up. This change captures the user-visible win (no more developer-facing status banners) without that churn. #MAPPS-282
fix(forms): replace developer-facing status strings with user messages (MAPPS-282)
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 2m55s
bc152343dc
The string-error helpers' last-resort branch returned \"Request failed with status: 422\" verbatim when the server hit a non-2xx without a parseable `ErrorResponse` envelope - the exact developer-facing banner the QA report flagged on the Contact form. Route the fallback through a `user_friendly_status(code)` helper that maps 400 / 401 / 403 / 404 / 409 / 422 / 429 / 5xx to a tasteful per-class message; the `_typed` helpers already do this via `ApiError::user_message`, so the migrated forms (Contact, Ticket create, Project) are unaffected. The many legacy callers that still use `post_authed` / `put_authed` (ticket inline edits, asset save, contract / billing / settings handlers) now show \"Validation failed. Please check the form fields.\" on a bodyless 422 instead of a raw status string.

A complete per-field 422 mapping for every legacy form is a separate, larger migration to the `_typed` API surface; tracked as a follow-up. This change captures the user-visible win (no more developer-facing status banners) without that churn.

#MAPPS-282
YousifShkara deleted branch fix/MAPPS-282-422-inline-field-errors 2026-06-21 07:06:06 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!290
No description provided.