salix/loopback/util/not-found-error.js

10 lines
303 B
JavaScript

module.exports = class NotFoundError extends Error {
constructor(message = 'Not found', code = 'NOT_FOUND', ...translateArgs) {
super(message);
this.name = 'NotFoundError';
this.statusCode = 404;
this.code = code;
this.translateArgs = translateArgs;
}
};