class CloudflareObjectNotFoundError
extends Error
Since 0.2.0

An R2 object read found nothing.

IStorage.get is contracted as Promise<Uint8Array> with no null arm, so an absent object has to be an error rather than a value. Callers that want a boolean use exists.

Constructors

CloudflareObjectNotFoundError(path: string)

Builds the error a missing R2 object produces.

Parameters
path: string

The object path that was requested

Properties

readonly
name: string

Discriminating name for instanceof-free checks.

Usage

import { CloudflareObjectNotFoundError } from "cloudflare-plugin/src/index.ts";