소스 검색

return a 409 for DocModified errors

Brian Gough 5 년 전
부모
커밋
dd082ad345
1개의 변경된 파일과 2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      services/docstore/app.js

+ 2 - 0
services/docstore/app.js

@@ -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')
   }