Skip to main content
Version: 4.0.1

ReadableStreamDefaultController.error()

The error() method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.

Note: The error() method can be called more than once, and can be called when the stream is not readable.

Syntax​

error(e)

Parameters​

  • e
    • : The error you want future interactions to fail with.

Return value​

None (undefined).

Exceptions​

  • TypeError
    • : Thrown if the source object is not a ReadableStreamDefaultController.