s-private API Documentation - v3.8.1
    Preparing search index...

    Domain event for system errors.

    Used to track and notify about system-level errors. The shouldNotify flag controls whether external notifications (e.g., Pushover) are sent.

    const event = new SystemErrorEvent({
    message: "Database connection failed",
    status: 500,
    caller: "connectDatabase",
    userId: "system",
    shouldNotify: true,
    extraData: { host: "localhost", port: 5432 }
    });

    // event.eventType === "system.error"
    await eventHandler.handle(event);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Creates a new system error event.

      Parameters

      • data: {
            caller: string;
            extraData?: unknown;
            message: string;
            shouldNotify?: boolean;
            status: number;
            userId?: string;
        }

        Error event data

        • caller: string

          The function/method where the error occurred

        • OptionalextraData?: unknown

          Additional context about the error

        • message: string

          Human-readable error message

        • OptionalshouldNotify?: boolean

          Whether to send external notifications (defaults to false)

        • status: number

          HTTP status code representing the error severity

        • OptionaluserId?: string

          The user affected (defaults to "system")

      Returns SystemErrorEvent

    Properties

    eventType: string

    The type of event (e.g., "article.created")

    metadata: { caller: string; timestamp: Date; userId: string }

    Contextual information about the event

    Event-specific data