From 15fd39043223ce8002f1d7aaffe629cbbe780b97 Mon Sep 17 00:00:00 2001 From: bandesz Date: Mon, 12 Sep 2016 16:11:34 +0100 Subject: [PATCH] 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'