Skip to content

Commit

Permalink
Update error.js
Browse files Browse the repository at this point in the history
Add standard errors from restify
  • Loading branch information
marsanla committed Nov 3, 2014
1 parent 5fe97a3 commit 235d53b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/error.js
Expand Up @@ -2,9 +2,8 @@
* Copyright (c) 2013 Timo Behrmann. All rights reserved.
*/

var handler = require('node-restify-errors');

module.exports.handle = function (errors, req, res, options, next) {
return res.send(400, {
status: 'validation failed',
errors: errors
});
};
return res.send(new handler.InvalidContentError(errors));
};

0 comments on commit 235d53b

Please sign in to comment.