fix(ShardClientUtil#_respond): construct global error (#8348)

This commit is contained in:
DD
2022-07-24 16:13:13 +03:00
committed by GitHub
parent 59a7e52224
commit 8e520f946a

View File

@@ -206,7 +206,7 @@ class ShardClientUtil {
*/
_respond(type, message) {
this.send(message).catch(err => {
const error = new Error(`Error when sending ${type} response to master process: ${err.message}`);
const error = new globalThis.Error(`Error when sending ${type} response to master process: ${err.message}`);
error.stack = err.stack;
/**
* Emitted when the client encounters an error.