mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
errorHandler: don't log timeouts
This commit is contained in:
parent
2cbbf2fbe7
commit
4bf3096454
1 changed files with 2 additions and 2 deletions
|
|
@ -6,11 +6,11 @@ export const errorHandler: ErrorHandler = (err, c) => {
|
|||
return c.json({ error: err.message }, err.status);
|
||||
}
|
||||
|
||||
console.error(err);
|
||||
|
||||
if (err.message === 'canceling statement due to statement timeout') {
|
||||
return c.json({ error: 'The server was unable to respond in a timely manner' }, 500);
|
||||
}
|
||||
|
||||
console.error(err);
|
||||
|
||||
return c.json({ error: 'Something went wrong' }, 500);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue