Refinitiv Data Platform Library for TypeScript

onError

Attaches an event handler function to the stream, which will be called when an error message is received for some of the requested instruments.

Syntax

stream.onError(callback: Pricing.StreamErrorCallback)

Parameters

Value Description Data type Optional Default value
callback Pricing.StreamErrorCallback function (see Pricing.StreamEvent ) function No -

Returned value

Pricing.Stream object

Usage

The following example demonstrates how to display messages received when a data retrieval error happens.

const stream = Pricing.Definition(['EUR=']).getStream();

await stream
    .onError(error => console.log(error))
    .open();

None.