Class: NotFoundError<TCode, TValues>
Defined in: index.ts:140
A referenced resource is missing, or the caller may not access it. Use it for both so a response never reveals whether a resource the caller cannot see exists.
Extends
ExpectedError<TCode,TValues>
Type Parameters
| Type Parameter | Default type |
|---|---|
TCode extends string | undefined | string | undefined |
TValues extends ExpectedErrorValues | undefined | ExpectedErrorValues | undefined |
Constructors
Constructor
new NotFoundError<
TCode,TValues>(message,options?):NotFoundError<TCode,TValues>
Defined in: index.ts:114
Parameters
| Parameter | Type |
|---|---|
message | string |
options | ExpectedErrorOptions<TCode, TValues> |
Returns
NotFoundError<TCode, TValues>
Inherited from
Properties
code
readonlycode:TCode
Defined in: index.ts:103
A subclass narrows it through the type parameter, e.g.
extends ExpectedError<'CARD_DECLINED' | 'CARD_EXPIRED'>.
Inherited from
expected
readonlyexpected:true
Defined in: index.ts:97
The discriminant isExpectedError reads. A marker rather than
instanceof because a bundler may inline its own copy of this class, and
an error thrown from that copy is not an instance of yours.
Inherited from
messageRef?
optionalmessageRef?:MessageRef
Defined in: index.ts:112
Mutable: a boundary may attach it before rendering.
Inherited from
values
readonlyvalues:TValues
Defined in: index.ts:109
A subclass narrows it per code through the type parameter, so the placeholders its copy interpolates are a checked contract.