refactor(PlayerError): return message on calling toJSON

This commit is contained in:
and 2021-11-28 13:43:35 +05:45
parent c1d2aeded5
commit bfd206d5df

View file

@ -39,7 +39,12 @@ export class PlayerError extends Error {
} }
toJSON() { toJSON() {
return { stack: this.stack, code: this.statusCode, created: this.createdTimestamp }; return {
stack: this.stack,
code: this.statusCode,
message: this.message,
created: this.createdTimestamp
};
} }
toString() { toString() {