hof 22.7.0-service-unavailable-beta.10 → 22.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## 2025-05-
|
1
|
+
## 2025-05-28, Version 22.7.0 (Stable), @Rhodine-orleans-lindsay @sulthan-ahmed
|
2
2
|
### Added
|
3
3
|
- 'Service Unavailable' functionality added which allows for services to redirect to a 'Service Unavailable' page when there is a need to pause a service for things like maintenance:
|
4
4
|
- Adds 'service unavailable' error middleware
|
package/README.md
CHANGED
@@ -849,6 +849,8 @@ Allows a service to be paused when required and then resumed. It ensures that an
|
|
849
849
|
|
850
850
|
### Usage
|
851
851
|
- Set the `SERVICE_UNAVAILABLE` env to `true` in your service.
|
852
|
+
- Set the`ERROR_REDIRECT_CODES` env to `500 501 502 504` in your service to override the default nginx error page for error `503`.
|
853
|
+
|
852
854
|
|
853
855
|
### Page Content Customisation
|
854
856
|
There is default text for this page. Default text can be overridden by setting the `message` and `answers-saved` properties in the `errors.json` file of the service. Note that information relating to who to contact and alternatives to using the form is optional and so there is no default text for these unless the properties `contact` and `alternative` are set in errors.json:
|
@@ -31,10 +31,5 @@
|
|
31
31
|
"title": "Sorry, the service is unavailable",
|
32
32
|
"message": "This service is temporarily unavailable.",
|
33
33
|
"answers-saved": "Your answers have not been saved."
|
34
|
-
},
|
35
|
-
"503": {
|
36
|
-
"title": "Sorry, the service is unavailable",
|
37
|
-
"message": "This service is temporarily unavailable.",
|
38
|
-
"answers-saved": "Your answers have not been saved."
|
39
34
|
}
|
40
35
|
}
|
package/package.json
CHANGED
@@ -1,26 +0,0 @@
|
|
1
|
-
{{<layout}}
|
2
|
-
{{$header}}
|
3
|
-
{{title}}
|
4
|
-
{{/header}}
|
5
|
-
{{$content}}
|
6
|
-
{{#serviceUnavailable}}
|
7
|
-
<h1 class="govuk-heading-l">{{title}}</h1>
|
8
|
-
<p class="govuk-body">{{message}}</p>
|
9
|
-
<p class="govuk-body">{{answers-saved}}</p>
|
10
|
-
{{#contact}}
|
11
|
-
<p class="govuk-body">{{contact}}</p>
|
12
|
-
{{/contact}}
|
13
|
-
{{#alternative}}
|
14
|
-
<p class="govuk-body">{{alternative}}</p>
|
15
|
-
{{/alternative}}
|
16
|
-
{{/serviceUnavailable}}
|
17
|
-
{{^serviceUnavailable}}
|
18
|
-
<h2>503 Service unavailable</h2>
|
19
|
-
<p>Sorry, we can't carry out your request at the moment.</p>
|
20
|
-
<p>Please try again or come back later test.</p>
|
21
|
-
<a class="govuk-button" href="javascript: window.history.back()" role="button">{{#t}}buttons.back{{/t}}</a>
|
22
|
-
<a href="/" class="govuk-button" role="button">{{#t}}buttons.start-again{{/t}}</a>
|
23
|
-
{{/serviceUnavailable}}
|
24
|
-
{{/content}}
|
25
|
-
{{/layout}}
|
26
|
-
|