refactor(PlayerError): return message on calling toJSON
This commit is contained in:
parent
c1d2aeded5
commit
bfd206d5df
1 changed files with 6 additions and 1 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue