@grow-codes/better-stack-logs - v0.1.1
    Preparing search index...

    Class HttpTransport

    The HTTP transport shared by every client: base URL join, query and JSON encoding, default headers and User-Agent, retries with full-jitter backoff and Retry-After, per-attempt and total timeouts, cancellation, hooks, logging and status → error mapping (SPEC §2.3).

    Index
    userAgent: string

    grow-codes-<key>/<version> (typescript)[ <suffix>].

    • Builds the absolute URL for a path and query.

      Parameters

      • path: string
      • Optionalquery: Readonly<Record<string, QueryValue>>

      Returns URL

    • Throws CancelledError ("<operation>: client is closed", not retryable) once close was called (SPEC §2.4). Requests check this themselves; service methods that send no request (cached reads, local helpers) call it first.

      Parameters

      • operation: string

      Returns void

    post

    • Redacts known secrets from a text (error messages, vendor text).

      Parameters

      • text: string

      Returns string

    • Extracts the vendor error message from a response body (JSON message, error, … or plain text; HTML is ignored), collapses whitespace, trims, redacts secrets and truncates it to MAX_VENDOR_TEXT characters. Returns undefined when there is nothing useful.

      Parameters

      • text: string

      Returns string | undefined