From 15fd39043223ce8002f1d7aaffe629cbbe780b97 Mon Sep 17 00:00:00 2001 From: bandesz Date: Mon, 12 Sep 2016 16:11:34 +0100 Subject: [PATCH 1/2] Add custom static error pages for 413 and some 5xx errors --- app/assets/error_pages/413.html | 138 ++++++++++++++++++++++++++++++++ app/assets/error_pages/5xx.html | 138 ++++++++++++++++++++++++++++++++ gulpfile.babel.js | 5 ++ 3 files changed, 281 insertions(+) create mode 100644 app/assets/error_pages/413.html create mode 100644 app/assets/error_pages/5xx.html diff --git a/app/assets/error_pages/413.html b/app/assets/error_pages/413.html new file mode 100644 index 000000000..7d7d0ba6e --- /dev/null +++ b/app/assets/error_pages/413.html @@ -0,0 +1,138 @@ + + + + GOV.UK Notify - Upload file size limit reached + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + + + + +

+ Upload file size limit reached +

+
+
+

+ The files you were trying to upload were too big, please try again with smaller files. +

+
+
+ +
+ +
+ + + + + + + + + + + + diff --git a/app/assets/error_pages/5xx.html b/app/assets/error_pages/5xx.html new file mode 100644 index 000000000..107ee1feb --- /dev/null +++ b/app/assets/error_pages/5xx.html @@ -0,0 +1,138 @@ + + + + GOV.UK Notify - Internal Server Error + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + + + + +

+ Something unexpected happened, sorry about it. +

+
+
+

+ We were notified about the issue, but if the problem persists feel free to contact us. +

+
+
+ +
+ +
+ + + + + + + + + + + + diff --git a/gulpfile.babel.js b/gulpfile.babel.js index b4452b5da..17fb7d8bb 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -103,6 +103,10 @@ gulp.task('images', () => gulp .pipe(gulp.dest(paths.dist + 'images/')) ); +gulp.task('copy:govuk_template:error_page', () => gulp.src(paths.src + 'error_pages/**/*') + .pipe(gulp.dest(paths.dist + 'error_pages/')) +); + // Watch for changes and re-run tasks gulp.task('watchForChanges', function() { @@ -141,6 +145,7 @@ gulp.task('default', 'copy:govuk_template:images', 'copy:govuk_template:css', 'copy:govuk_template:js', + 'copy:govuk_template:error_page', 'javascripts', 'sass', 'images' From d11c7e08c21aa251c89cd19fa55e3868f7a7e317 Mon Sep 17 00:00:00 2001 From: bandesz Date: Mon, 12 Sep 2016 16:49:52 +0100 Subject: [PATCH 2/2] Add final error page texts --- app/assets/error_pages/413.html | 9 ++++++--- app/assets/error_pages/5xx.html | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/assets/error_pages/413.html b/app/assets/error_pages/413.html index 7d7d0ba6e..632375cdb 100644 --- a/app/assets/error_pages/413.html +++ b/app/assets/error_pages/413.html @@ -1,7 +1,7 @@ - GOV.UK Notify - Upload file size limit reached + GOV.UK Notify - The file you uploaded was too big @@ -79,12 +79,15 @@

- Upload file size limit reached + The file you uploaded was too big

- The files you were trying to upload were too big, please try again with smaller files. + Files must be smaller than 5 MB. +

+

+ Go back and try again.

diff --git a/app/assets/error_pages/5xx.html b/app/assets/error_pages/5xx.html index 107ee1feb..1f467d99d 100644 --- a/app/assets/error_pages/5xx.html +++ b/app/assets/error_pages/5xx.html @@ -79,12 +79,12 @@

- Something unexpected happened, sorry about it. + Sorry, we’re experiencing technical difficulties

- We were notified about the issue, but if the problem persists feel free to contact us. + Try again later.