Skip to main content

Class: ItemNotFoundError

Defined in: packages/core/src/errors/ItemNotFoundError.ts:23

The canonical "an item searched for in a collection was not found" error. Component-specific list-miss errors (e.g. a menu's MenuItemNotFoundError) subclass this so callers can catch the family with one instanceof check.

Per ADR-010 it retains only a serializable locatorDescription string — never the live locator — keeping the frozen error contract decoupled from the locator model.

Param​

query

What was searched for — a PartLocator or a human-readable description such as an item label.

Param​

driver

Anything name-bearing (a driver satisfies { driverName }); only its driverName is retained.

Param​

message

Optional override for the generated message, used by subclasses that phrase the miss in their own terms.

Extends​

Constructors​

Constructor​

new ItemNotFoundError(query, driver, message?): ItemNotFoundError

Defined in: packages/core/src/errors/ItemNotFoundError.ts:26

Parameters​

query​

string | PartLocator

driver​
driverName​

string

message?​

string

Returns​

ItemNotFoundError

Overrides​

ErrorBase.constructor

Properties​

cause?​

optional cause?: unknown

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from​

ErrorBase.cause


driverName​

readonly driverName: string

Defined in: packages/core/src/errors/ErrorBase.ts:13

Inherited from​

ErrorBase.driverName


locatorDescription​

readonly locatorDescription: string

Defined in: packages/core/src/errors/ItemNotFoundError.ts:24


message​

message: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from​

ErrorBase.message


name​

name: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from​

ErrorBase.name


stack?​

optional stack?: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from​

ErrorBase.stack

Methods​

isError()​

static isError(error): error is Error

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.error.d.ts:21

Indicates whether the argument provided is a built-in Error instance or not.

Parameters​

error​

unknown

Returns​

error is Error

Inherited from​

ErrorBase.isError