API reference > @kontsedal/olas-core > ErrorContext
ErrorContext type
Context passed to a root's onError handler. kind identifies where in the controller's surface the throw originated; controllerPath is the path from root to the controller that owned the failing code; queryId and key name the cache entry for cache kinds. Spec §12, §20.9.
'plugin' is used for exceptions raised by plugin hooks and reported through host.reportError (@kontsedal/olas-cross-tab and friends); SPEC §13.
The remaining fields are correlation hooks for telemetry adapters (Sentry / OpenTelemetry breadcrumbs / Datadog RUM): eventId is a stable per-dispatch UUID, timestamp is wall-clock ms, attempt and cause describe a failed fetch (cache kinds), pluginName identifies the throwing plugin (set only when kind == 'plugin').
Signature:
type ErrorContext = {
kind: 'effect' | 'cache' | 'mutation' | 'emitter' | 'construction' | 'plugin';
controllerPath: readonly string[];
queryId?: string;
key?: readonly unknown[];
eventId: string;
timestamp: number;
attempt?: number;
cause?: unknown;
pluginName?: string;
};