Refinitiv Data Platform Library for TypeScript

onError

Attaches the Error event handler function to the stream.

Syntax

streamingChain.onError(callback: Pricing.Chain.OnErrorCallback)

Parameters

Value Description Data type Optional Default value
callback Pricing.Chain.OnErrorCallback function (see Pricing.Chain.Event) function No -

Returned value

Pricing.Chain.Stream object

Usage

The following example demonstrates how to display the messages received when the streaming receives an error message.

const streamingChain = await Pricing.Chain.Definition('.AV.HSI').getStream(session);

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

None.