diff --git a/server/services/resources/NotFoundError.js b/server/services/resources/NotFoundError.js index 835fe78..d3bfd74 100644 --- a/server/services/resources/NotFoundError.js +++ b/server/services/resources/NotFoundError.js @@ -1,3 +1,11 @@ -export default -class NotFoundError extends Error { +export default class NotFoundError extends Error { + constructor(message) { + super(message); + this.name = this.constructor.name; + this.message = message; + this.status = 404; + this.isPublic = true; + this.isOperational = true; // This is required since bluebird 4 doesn't append it anymore. + Error.captureStackTrace(this, this.constructor.name); + } }