Sanity Library Reference Docs
    Preparing search index...

    Class ConnectionFailedError

    Thrown when the EventSource connection could not be established, or was rejected by the server. Transient failures (network drops, 5xx, 408, 429) are reconnected internally and emitted as reconnect events; a permanent rejection (any other 4xx, eg an expired token) errors the stream with this class so consumers can react — check status for the rejection code.

    Hierarchy

    • Error
      • ConnectionFailedError
    Index

    Constructors

    Properties

    Constructors

    Properties

    name: "ConnectionFailedError" = 'ConnectionFailedError'
    status?: number

    HTTP status code of the rejected connection attempt, if known. Only set when the EventSource implementation exposes it — the eventsource package used by the client does (as code on its error events), while native EventSource implementations (browser and Node.js) do not.