Class: ErrorData

  • cast.framework.messages.ErrorData provides structured information about errors occurring within the Cast framework.

  • It includes properties like type, reason, detailedErrorCode, and customData to offer detailed insights into the error.

  • An ErrorData object is associated with a specific request, identified by its requestId, and might be linked to a queue item via itemId if applicable.

  • Developers can utilize customData for application-specific error handling and debugging.

Constructor

ErrorData

new ErrorData(type)

Parameter

type

cast.framework.messages.ErrorType

Value must not be null.

Properties

customData

(nullable Object or undefined)

Application-specific data for this request. It enables the sender and receiver to easily extend the media protocol without having to use a new namespace with custom messages.

detailedErrorCode

(non-null cast.framework.events.DetailedErrorCode or undefined)

Optional detailed error code from player.

itemId

(number or undefined)

An itemId of a queue item for errors that were related to a particular queue item. For example, when loading a queue item failed.

reason

(non-null cast.framework.messages.ErrorReason or undefined)

The error reason.

requestId

number

ID of the request, used to correlate request/response.

type

non-null cast.framework.messages.ErrorType