onPanelEvent
A panel's event for your channel, keyed by the event's name.
Type
assocArray: { <event name>: data }
Example
m.maestro.observeField("onPanelEvent", "onMaestroPanelEvent")
sub onMaestroPanelEvent(event as object)
panelEvent = event.getData()
if panelEvent?.error?.payload?.code = 401
refreshHeaders(panelEvent.error.payload.details.panel)
end if
end sub
Expired credentials (401)
When a panel's request is answered 401, the SDK sends one error event per refresh cycle, whichever panels hit it.
| Field | Type | Description |
|---|---|---|
error.type | string | "general:error" |
error.timestamp | string | ISO 8601 time of the error |
error.payload.message | string | The error message |
error.payload.code | integer | 401 |
error.payload.details.panel | string | The panel type that got the 401 |
error.payload.details.url | string | The URL that answered 401 |
Answer with fresh credentials through setDataToPanel, in the field the panel
documents. Until then the field headerRefreshInFlight is true and panels hold their requests. After three cycles
without a successful request, the SDK stops sending the event and the panel shows its own error.
Notes
- Each panel documents the events it sends here.
- Analytics events arrive on
trackActionandtrackImpression.