Skip to content

Conversation

@ChrisBAshton
Copy link
Contributor

@ChrisBAshton ChrisBAshton commented Dec 3, 2025

What

When trying to create a document that has an already reserved base path, catch the error and render an error with the title field on the new document form.

Why

Continues the work of #10912, now presenting an error to the user. It uses the construct_similar_slug_warning_error helper method as the error message and invalid field are applicable here.

Visual Differences

Screenshot 2026-01-06 at 15 22 53

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This application is owned by the Whitehall Experience team. Please let us know in #govuk-whitehall-experience-tech when you raise any PRs.

Follow these steps if you are doing a Rails upgrade.

@patrickpatrickpatrick patrickpatrickpatrick force-pushed the avoid-accidentally-overwriting-base-path branch from 3611a8f to 9de162c Compare December 8, 2025 11:44
Base automatically changed from avoid-accidentally-overwriting-base-path to main December 9, 2025 09:59
@patrickpatrickpatrick patrickpatrickpatrick force-pushed the catch-base-path-exception-and-show-user branch 2 times, most recently from f02d8a6 to 4383c4b Compare December 9, 2025 13:54
@patrickpatrickpatrick patrickpatrickpatrick force-pushed the catch-base-path-exception-and-show-user branch 10 times, most recently from a396a17 to 025310d Compare December 22, 2025 15:46
@patrickpatrickpatrick patrickpatrickpatrick changed the title WIP: Attempt to catch exception and show user error message Attempt to catch exception and show user error message Dec 23, 2025
@patrickpatrickpatrick patrickpatrickpatrick force-pushed the catch-base-path-exception-and-show-user branch 3 times, most recently from 5ddabe7 to 7e59046 Compare January 6, 2026 15:13
@patrickpatrickpatrick patrickpatrickpatrick changed the title Attempt to catch exception and show user error message Render error to user if base path reserved [WHIT-2884] Jan 6, 2026
Instead of presenting a server error to the user if they try and create
an edition that has the base path of another published edition, the
error is now presented to the user.
@patrickpatrickpatrick patrickpatrickpatrick force-pushed the catch-base-path-exception-and-show-user branch from 7e59046 to e9c11b6 Compare January 6, 2026 15:21
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.

2 participants