web-push-error.js 388 B

12345678910111213141516
  1. 'use strict';
  2. function WebPushError(message, statusCode, headers, body, endpoint) {
  3. Error.captureStackTrace(this, this.constructor);
  4. this.name = this.constructor.name;
  5. this.message = message;
  6. this.statusCode = statusCode;
  7. this.headers = headers;
  8. this.body = body;
  9. this.endpoint = endpoint;
  10. }
  11. require('util').inherits(WebPushError, Error);
  12. module.exports = WebPushError;