mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
refactor: error messages in app.onError()
This commit is contained in:
parent
1731e7dac9
commit
a868512188
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue