mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-22 09:57:10 +00:00
fix: FatalError set reference to causing error (#1257)
This commit is contained in:
parent
766b4344a8
commit
12d28f3958
@ -30,7 +30,10 @@ exports.FatalError = class FatalError extends exports.BaseError {
|
|||||||
const error = (typeof data === 'string') ? null : data;
|
const error = (typeof data === 'string') ? null : data;
|
||||||
const message = error ? error.message : data;
|
const message = error ? error.message : data;
|
||||||
super('EFATAL', message);
|
super('EFATAL', message);
|
||||||
if (error) this.stack = error.stack;
|
if (error) {
|
||||||
|
this.stack = error.stack;
|
||||||
|
this.cause = error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user