From 36ac5190e3529de342d2da957503697afee4271b Mon Sep 17 00:00:00 2001 From: Gandalf Date: Sat, 4 May 2024 17:56:04 +0000 Subject: [PATCH] Don't put error message directly to a webpage. --- src/server/api/general.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/general.js b/src/server/api/general.js index 86de194f..21c9618b 100644 --- a/src/server/api/general.js +++ b/src/server/api/general.js @@ -277,7 +277,7 @@ export default function useGeneralApi(app) { ctx.status = 200; } catch (error) { console.error('Error in /search api call', ctx.session.uid, error); - ctx.body = JSON.stringify({ error: error.message }); + ctx.body = JSON.stringify({ error: "An unexpected error occurred. Please try again later." }); ctx.status = 500; } });