PERS SDK - v2.3.26 / Exports / ErrorEvent
Error event - uses ErrorDomain (business + technical domains)
Used for failures including:
- Business errors (insufficient balance, expired campaign)
- Technical errors (validation, system, external API)
BaseEvent↳
ErrorEvent
• id: string
Unique event ID
BaseEvent.id
core/events/event-types.ts:164
• timestamp: number
Unix timestamp (ms)
BaseEvent.timestamp
core/events/event-types.ts:166
• type: KnownEventType
Specific event type within domain
BaseEvent.type
core/events/event-types.ts:168
• userMessage: string
User-friendly message - ALWAYS present, ready for display
BaseEvent.userMessage
core/events/event-types.ts:170
• Optional action: string
Suggested action for user (optional)
BaseEvent.action
core/events/event-types.ts:172
• Optional code: string
Error/event code from backend
BaseEvent.code
core/events/event-types.ts:174
• Optional details: EventDetails
Additional details for logging/debugging
BaseEvent.details
core/events/event-types.ts:176
• level: "error"
core/events/event-types.ts:202
• domain: ErrorDomain
Business + technical domains (includes validation, system, external)