1 | const BuzzAPIError = function(
|
2 | message,
|
3 | buzzApiErrorInfo,
|
4 | buzzApiBody,
|
5 | buzzApiMessageId
|
6 | ) {
|
7 | this.name = "BuzzAPIError";
|
8 | this.message = message || "BuzzApi error";
|
9 | this.stack = new Error().stack;
|
10 | this.buzzApiErrorInfo = buzzApiErrorInfo || {};
|
11 | this.buzzApiBody = buzzApiBody || {};
|
12 | this.buzzApiMessageId = buzzApiMessageId;
|
13 | };
|
14 |
|
15 | BuzzAPIError.prototype = Object.create(Error.prototype);
|
16 | BuzzAPIError.prototype.constructor = BuzzAPIError;
|
17 |
|
18 | module.exports = BuzzAPIError;
|