Skip to content

Commit

Permalink
Add BadRequestError to errorMap
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsey committed May 19, 2018
1 parent b997b67 commit aabfec7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/error-map.js
Expand Up @@ -2,6 +2,7 @@ var Boom = require('boom');

const INTERNAL = 500;
const NOT_FOUND = 404;
const BAD_REQUEST = 400;

var errorMap = {
'IntegrityContraintViolationError': INTERNAL,
Expand All @@ -14,7 +15,8 @@ var errorMap = {
'CreationError': INTERNAL,
'DeletionError': INTERNAL,
'ConflictError': INTERNAL,
'NotFoundError': NOT_FOUND
'NotFoundError': NOT_FOUND,
'BadRequestError': BAD_REQUEST
};

module.exports = {
Expand Down

0 comments on commit aabfec7

Please sign in to comment.