class StorageObjectNotFound
extends Error

Error thrown when attempting to get or head an object that does not exist.

Examples

Handling not found errors

import { Storage, createMemory, StorageObjectNotFound } from "@anabranch/storage";

try {
  const object = await storage.get("missing.txt").run();
} catch (error) {
  if (error instanceof StorageObjectNotFound) {
    console.log("Object does not exist");
  }
}

Constructors

new
StorageObjectNotFound(key: string)

Properties

name: string

Usage

import { StorageObjectNotFound } from ".";