Skip to content

feat(DF-789): block save-and-exit and help routes when form is offline#1196

Open
mokhld wants to merge 5 commits into
mainfrom
feat-DF-789-form-offline
Open

feat(DF-789): block save-and-exit and help routes when form is offline#1196
mokhld wants to merge 5 commits into
mainfrom
feat-DF-789-form-offline

Conversation

@mokhld
Copy link
Copy Markdown
Contributor

@mokhld mokhld commented May 13, 2026

Service-layer wrappers in formMetadataGuards.js throw the offline marker; engine plugin's onPreResponse renders the unavailable view. Draft until @defra/forms-model is bumped here.

@mokhld mokhld marked this pull request as ready for review May 14, 2026 09:03
@mokhld mokhld marked this pull request as draft May 14, 2026 10:23
* and renders the unavailable view at HTTP 200.
* @param {FormMetadata} metadata
*/
function assertFormAvailable(metadata) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these two guard methods be pulled from plugin, so they don't have to be duplicated here? Not a biggy though

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly, but it will be a bit more of a refactor. I don't think I have time for it. Possibly tech debt that we can come back to?

Copy link
Copy Markdown
Contributor

@jbarnsley10 jbarnsley10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. A v minor comment but approving in principal

@mokhld mokhld marked this pull request as ready for review May 14, 2026 13:28
@mokhld mokhld force-pushed the feat-DF-789-form-offline branch from a3968cc to 117d584 Compare May 14, 2026 18:49
@sonarqubecloud
Copy link
Copy Markdown

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