From a868512188bdc8af2c1e28fdb1a6866df8347b01 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Tue, 2 Jul 2024 18:38:16 -0300 Subject: [PATCH] refactor: error messages in app.onError() --- src/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.ts b/src/app.ts index c47d2579..4c0ffc7e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -342,9 +342,9 @@ app.get('*', publicFiles, staticFiles, frontendController); app.onError((err, c) => { if (err.message === 'canceling statement due to statement timeout') { - return c.json({ error: "A timeout happened, don't worry :)" }, 500); + return c.json({ error: 'The server was unable to respond in a timely manner' }, 500); } - return c.json(500); + return c.json({ error: 'Something went wrong' }, 500); }); export default app;