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

    Domain event for system warnings.

    Used to track non-critical issues that don't require immediate action. The shouldNotify flag controls whether external notifications are sent.

    const event = new SystemWarningEvent({
    message: "Cache miss rate above threshold",
    status: 200,
    caller: "cacheService",
    shouldNotify: false,
    extraData: { missRate: 0.75 }
    });

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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Creates a new system warning event.

      Parameters

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

        Warning event data

        • caller: string

          The function/method where the warning occurred

        • OptionalextraData?: unknown

          Additional context about the warning

        • message: string

          Human-readable warning message

        • OptionalshouldNotify?: boolean

          Whether to send external notifications (defaults to false)

        • status: number

          HTTP status code (typically 2xx for warnings)

        • OptionaluserId?: string

          The user affected (defaults to "system")

      Returns SystemWarningEvent

    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