toJSON() { return { statusCode: this.statusCode, code: this.getCode(), name: this.constructor.name, message: this.message, humanMessage: this.getHumanMessage(), filename: this.getFileName(), prevError: this.getPrevError(), errors: Array.isArray(this.getDetails()) ? this.getDetails() : [this.getDetails()], stack: StandardException.stackBeautifier(this.stack), fullStack: this.stack.split('\n') }; }
toJSON() { return { statusCode: this.statusCode, code: this.getCode(), name: this.constructor.name, message: this.message, humanMessage: this.getHumanMessage(), filename: this.getFileName(), prevError: this.getPrevError(), errors: Array.isArray(this.getDetails()) ? this.getDetails() : [this.getDetails()], stack: StandardException.stackBeautifier(this.stack), fullStack: this.stack.split('\n') }; }