method BaseError.prototype.toJSON BaseError.prototype.toJSON(): string Serializes error to JSON string. Return Type string JSON string representation of the error