Skip to content

Commit

Permalink
fix: resolve the delete not exist resource return incorrect HTTP resp…
Browse files Browse the repository at this point in the history
…onse code
  • Loading branch information
Chinlinlee committed Oct 26, 2021
1 parent d50e66c commit f63be17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/FHIRApiService/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ module.exports = async function(req, res, resourceType) {
},
"false": (err) => {
if (_.isString(err)) {
if (err.includes("not found")) {
return doRes(404, handleError['not-found'](err));
}
return doRes(500,handleError.exception(err));
}
return doRes(500,handleError.exception(err.message));
Expand Down

0 comments on commit f63be17

Please sign in to comment.