mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
return a 409 for DocModified errors
This commit is contained in:
parent
69339aeb9d
commit
dd082ad345
1 changed files with 2 additions and 0 deletions
|
@ -91,6 +91,8 @@ app.use(function (error, req, res, next) {
|
|||
logger.error({ err: error, req }, 'request errored')
|
||||
if (error instanceof Errors.NotFoundError) {
|
||||
return res.sendStatus(404)
|
||||
} else if (error instanceof Errors.DocModifiedError) {
|
||||
return res.sendStatus(409)
|
||||
} else {
|
||||
return res.status(500).send('Oops, something went wrong')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue