Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Type Alias ChunkFetchOutcome

    ChunkFetchOutcome:
        | { kind: "ok"; data: Uint8Array; bytesOverWire: number }
        | { kind: "missing" }
        | { kind: "aborted" }
        | { kind: "error"; cause: Error }
        | { kind: "fatal"; cause: Error }

    Result of asking a source for one key.

    Maps 1:1 onto the Result<Uint8Array, CacheError> the store already returns, so the L3 branch stays a plain switch and no new error taxonomy appears.

    Type Declaration

    • { kind: "ok"; data: Uint8Array; bytesOverWire: number }

      Bytes in hand. bytesOverWire is what the network actually moved.

    • { kind: "missing" }

      The source answered, and this key is not there (an HTTP 404, say).

    • { kind: "aborted" }

      A caller signal, a store disposal, or an invalidation cancelled the read.

    • { kind: "error"; cause: Error }

      A non-missing HTTP failure or transient failure after retries.

    • { kind: "fatal"; cause: Error }

      The CONTAINER is unreadable — not this one key.

      Distinct from error because the store's handling of the two must differ: an ordinary source error is retryable by the loader, while a container fault needs its authored recovery path. The store rethrows both rather than allowing zarrita to fabricate fill values.