nodejs
javascript
testing
npm
styleguide
express
microservices
rest
mocha
types
eslint
es6
jest
style-guide
best-practices
expressjs
node-js
nodejs-development
-
Updated
Aug 15, 2021 - JavaScript
If not for some particular exceptions, the status code returned from our WebAPI on error is always 500, regardless of the kind of error.
If an object already exists, for example, it should be returned as
409
. If the object does not pass the schema validation, it should be a415
.Go through the whole WebAPI and verify that the status codes are being returned correctly.
Hint:
Error
cl