Ghost/core/server/errors/badrequesterror.js
Harry Wolff 469aaa398c Add jscs task to grunt file and clean up files to adhere to jscs rules.
resolves #1920

- updates all files to conform to style settings.
2014-09-17 21:44:29 -04:00

15 lines
381 B
JavaScript

// # Bad request error
// Custom error class with status code and type prefilled.
function BadRequestError(message) {
this.message = message;
this.stack = new Error().stack;
this.code = 400;
this.type = this.name;
}
BadRequestError.prototype = Object.create(Error.prototype);
BadRequestError.prototype.name = 'BadRequestError';
module.exports = BadRequestError;