refactor: error messages in app.onError()

This commit is contained in:
P. Reis 2024-07-02 18:38:16 -03:00
parent 1731e7dac9
commit a868512188

View file

@ -342,9 +342,9 @@ app.get('*', publicFiles, staticFiles, frontendController);
app.onError((err, c) => { app.onError((err, c) => {
if (err.message === 'canceling statement due to statement timeout') { 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; export default app;