From 6f116b6963f66c3e6c08937489956a9e29081f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 4 Mar 2019 15:51:07 +0100 Subject: [PATCH] Remove custom error page I find the custom error page out of scope of this PR so I will create another tracking PR to get this feature merged as soon as possible. See: https://github.com/Human-Connection/Nitro-Web/pull/216 --- .../integration/moderation/HidePosts.feature | 2 +- layouts/error.vue | 57 ------------------- pages/post/_slug/index.vue | 4 +- 3 files changed, 4 insertions(+), 59 deletions(-) delete mode 100644 layouts/error.vue diff --git a/cypress/integration/moderation/HidePosts.feature b/cypress/integration/moderation/HidePosts.feature index f42f3c790..c2cf49912 100644 --- a/cypress/integration/moderation/HidePosts.feature +++ b/cypress/integration/moderation/HidePosts.feature @@ -22,5 +22,5 @@ Feature: Hide Posts Given I am logged in with a "user" role Then the page "/post/this-post-is-disabled" returns a 404 error with a message: """ - Sorry, the page you're looking for cannot be found. + This post could not be found """ diff --git a/layouts/error.vue b/layouts/error.vue deleted file mode 100644 index f78ed7ade..000000000 --- a/layouts/error.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - diff --git a/pages/post/_slug/index.vue b/pages/post/_slug/index.vue index 5422bb562..f3726d6db 100644 --- a/pages/post/_slug/index.vue +++ b/pages/post/_slug/index.vue @@ -236,7 +236,9 @@ export default { data: { Post } } = await client.query({ query, variables }) if (Post.length <= 0) { - return error({ statusCode: 404 }) + // TODO: custom 404 error page with translations + const message = 'This post could not be found' + return error({ statusCode: 404, message }) } const [post] = Post return {