diff --git a/packages/endpoint-auth/lib/controllers/documentation.js b/packages/endpoint-auth/lib/controllers/documentation.js index 32477e72a..dbb2ab75f 100644 --- a/packages/endpoint-auth/lib/controllers/documentation.js +++ b/packages/endpoint-auth/lib/controllers/documentation.js @@ -7,6 +7,7 @@ export const documentationController = (error, request, response, next) => { response.render("auth", { title: response.locals.__("auth.guidance.title"), error: error.message, + error_details: error.stack, }); } else if (request.accepts("json")) { return next(error); diff --git a/packages/endpoint-files/lib/controllers/delete.js b/packages/endpoint-files/lib/controllers/delete.js index 07cbd59a7..9e72eee27 100644 --- a/packages/endpoint-files/lib/controllers/delete.js +++ b/packages/endpoint-files/lib/controllers/delete.js @@ -42,6 +42,7 @@ export const deleteController = { title: response.locals.__("files.delete.title"), parent: { text: fileName }, error: error.message, + error_details: error.stack, }); } }, diff --git a/packages/endpoint-files/lib/controllers/form.js b/packages/endpoint-files/lib/controllers/form.js index 9f90c257c..99ac02274 100644 --- a/packages/endpoint-files/lib/controllers/form.js +++ b/packages/endpoint-files/lib/controllers/form.js @@ -54,6 +54,7 @@ export const formController = { response.render("file-form", { title: response.locals.__("files.upload.title"), error: error.message, + error_details: error.stack, }); } }, diff --git a/packages/endpoint-posts/lib/controllers/delete.js b/packages/endpoint-posts/lib/controllers/delete.js index 77e3ed678..37135f0ca 100644 --- a/packages/endpoint-posts/lib/controllers/delete.js +++ b/packages/endpoint-posts/lib/controllers/delete.js @@ -45,6 +45,7 @@ export const deleteController = { title: response.locals.__(`posts.${action}.title`), parent: { text: postName }, error: error.message, + error_details: error.stack, }); } }, diff --git a/packages/endpoint-posts/lib/controllers/form.js b/packages/endpoint-posts/lib/controllers/form.js index ebe283c58..049194bd8 100644 --- a/packages/endpoint-posts/lib/controllers/form.js +++ b/packages/endpoint-posts/lib/controllers/form.js @@ -92,6 +92,7 @@ export const formController = { postTypeName.toLowerCase() ), error: error.message, + error_details: error.stack, }); } }, diff --git a/packages/endpoint-posts/tests/integration/500-post-create.js b/packages/endpoint-posts/tests/integration/500-post-create.js index 528e76661..7f2ef3796 100644 --- a/packages/endpoint-posts/tests/integration/500-post-create.js +++ b/packages/endpoint-posts/tests/integration/500-post-create.js @@ -23,7 +23,7 @@ test("Returns 500 error creating post", async (t) => { ).textContent; t.is(response.status, 500); - t.is(result, "Test store: Unauthorized"); + t.regex(result, /\bTest store: Unauthorized\b/g); server.close(t); }); diff --git a/packages/endpoint-share/lib/controllers/share.js b/packages/endpoint-share/lib/controllers/share.js index 59cdde5d5..667069ad8 100644 --- a/packages/endpoint-share/lib/controllers/share.js +++ b/packages/endpoint-share/lib/controllers/share.js @@ -69,6 +69,7 @@ export const shareController = { name, bookmarkOf, error: error.message, + error_details: error.stack, minimalui: request.params.path === "bookmarklet", }); } diff --git a/packages/endpoint-share/tests/integration/400-post-share.js b/packages/endpoint-share/tests/integration/400-post-share.js index 1a25ebf7e..cfce7de60 100644 --- a/packages/endpoint-share/tests/integration/400-post-share.js +++ b/packages/endpoint-share/tests/integration/400-post-share.js @@ -17,9 +17,9 @@ test("Returns 400 error publishing post", async (t) => { const result = dom.window.document; t.is(response.status, 400); - t.is( + t.regex( result.querySelector(".notification--error p").textContent, - "No bearer token provided by request" + /\bNo bearer token provided by request\b/g ); server.close(t); diff --git a/packages/indiekit/lib/indieauth.js b/packages/indiekit/lib/indieauth.js index b736d5668..0bbbe00d7 100644 --- a/packages/indiekit/lib/indieauth.js +++ b/packages/indiekit/lib/indieauth.js @@ -100,6 +100,7 @@ export const IndieAuth = class { return response.status(401).render("session/login", { title: response.locals.__("session.login.title"), error: error.message, + error_details: error.stack, }); } }; @@ -172,6 +173,7 @@ export const IndieAuth = class { return response.render("session/login", { title: response.locals.__("session.login.title"), error: error.message, + error_details: error.stack, }); } };