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

    Error thrown when a notification fails to send.

    This error is thrown when the Pushover API request fails or returns a non-OK response. The error is caught internally by the notification service to prevent infinite loops in error handling scenarios.

    import { NotificationError } from "@s-hirano-ist/s-notification";

    try {
    await notificationService.notifyError("Test message", { caller: "Test" });
    } catch (error) {
    if (error instanceof NotificationError) {
    console.error("Failed to send notification:", error.message);
    }
    }

    createPushoverService for the notification service factory

    Hierarchy

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    cause?: unknown
    message: string
    name: string
    stack?: string

    Methods

    • Indicates whether the argument provided is a built-in Error instance or not.

      Parameters

      • error: unknown

      Returns error is Error