aftermath-ts-sdk - v3.3.3
    Preparing search index...

    An Error with structured information about an Aftermath transport failure.

    The constructor preserves an explicit message first, then a string cause.message, and finally a kind-specific default. The original cause is stored as a non-enumerable cause property when supplied. Defaults are Aftermath HTTP request failed (or that text with with status N) for http, Aftermath network request failed for network, Aftermath request was aborted for abort, Aftermath request timed out for timeout, and Aftermath response could not be decoded for decode.

    Hierarchy

    • Error
      • AftermathTransportError
    Index
    • Creates a structured transport error.

      name defaults to the cause's string name, or AftermathTransportError. message defaults to the cause's string message, or a message derived from kind and status. Optional fields are assigned only when provided.

      Parameters

      • kind: AftermathTransportErrorKind

        The transport category.

      • options: {
            abortSource?: AftermathAbortSource;
            cause?: unknown;
            code?: string;
            message?: string;
            name?: string;
            retryAfterMs?: number;
            status?: number;
        } = {}

        The message, status, retry metadata, source error, and abort classification.

        • OptionalabortSource?: AftermathAbortSource

          Whether an abort-like error came from the caller or a timeout.

        • Optionalcause?: unknown

          The original thrown value.

        • Optionalcode?: string

          The source error code.

        • Optionalmessage?: string

          Overrides the derived error message.

        • Optionalname?: string

          Overrides the derived error name.

        • OptionalretryAfterMs?: number

          The retry delay in milliseconds.

        • Optionalstatus?: number

          The HTTP response status.

      Returns AftermathTransportError

    abortSource?: AftermathAbortSource

    The source of an abort or timeout classification.

    cause?: unknown

    The original thrown value, stored as a non-enumerable property.

    code?: string

    The transport or runtime error code, when the source supplied one.

    The normalized transport category.

    retryAfterMs?: number

    The supplied retry delay in milliseconds, when present.

    status?: number

    The HTTP status for an http error, when available.