# cast.[framework](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework).[events](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.events).ErrorEvent

class static

Event data for a `cast.framework.events.EventType.ERROR` event.

## Constructor

### ErrorEvent

new
ErrorEvent(detailedErrorCode, error, reason, severity, triggeredByEventType)

| #### Parameter ||
|---|---|
| detailedErrorCode | Optional [cast.framework.events.DetailedErrorCode](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.events#.DetailedErrorCode) Value must not be null. |
| error | Optional Object Value must not be null. |
| reason | Optional [cast.framework.messages.ErrorReason](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.ErrorReason) Value must not be null. |
| severity | Optional [cast.framework.events.ErrorSeverity](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.events#.ErrorSeverity) Value must not be null. |
| triggeredByEventType | Optional [cast.framework.events.EventType](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.events#.EventType) Value must not be null. |

## Properties

### detailedErrorCode

constant

(non-null [cast.framework.events.DetailedErrorCode](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.events#.DetailedErrorCode) or undefined)

An error code representing the cause of the error.

### error

constant

(non-null Error, non-null Object, or undefined)

The error object. This could be an `Error` object (for example, if an
`Error` was thrown in an event handler) or an object with error
information (for example, if the receiver received an invalid command).

### reason

(non-null [cast.framework.messages.ErrorReason](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.ErrorReason) or undefined)

Optional error reason.

### severity

(non-null [cast.framework.events.ErrorSeverity](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.events#.ErrorSeverity) or undefined)

Optional error severity.

### triggeredByEventType

constant

(non-null [cast.framework.events.EventType](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.events#.EventType) or undefined)

The CAF event type that triggered this error, if this error event was
thrown because of an error occurring within the event handler for that
event. Undefined if this error event was not triggered by a CAF event
handler implemented by the cast receiver application.