error

fun error(reason: JsError? = definedExternally)(source)

The error() method of the TransformStreamDefaultController interface errors both sides of the stream.

MDN Reference