fix/BUNYIP-191-humanise-generic-internal-error #215
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/bunyip!215
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-191-humanise-generic-internal-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to BUNYIP-187. The Subscribe flash banner correctly surfaces the api's `user_message`, but for any `AppError::InternalError` / `AppError::DatabaseError` dunite-core returns the single generic string "An unexpected error occurred. Please try again later." That leaves the operator with no actionable hint - the real cause is logged on the api side but the banner does not point at the logs. Add a match arm in `humanise_checkout_error` that detects this exact dunite string and rewrites it to: "Checkout failed unexpectedly on the server. The api logged the cause - check `docker logs <bunyip-api>` for 'Failed to create Stripe checkout session' or similar, then contact support." so an operator chasing a Subscribe failure knows where to look without having to read dunite-core or guess. Specific 400-class messages ("No active price configured", "Stripe is not configured") still match their existing arms first, so the targeted copy from BUNYIP-187 is unchanged when the api actually produces a recognisable validation error. #BUNYIP-191