Documentation / @agentick/shared / NotFoundError
Class: NotFoundError ​
Defined in: errors.ts:261
Error thrown when a required resource cannot be found.
Example ​
throw new NotFoundError('model', 'gpt-4');
throw new NotFoundError('tool', 'search', 'Tool not found in registry');
throw new NotFoundError('execution', 'exec-123', 'Parent execution not found');Extends ​
Constructors ​
Constructor ​
new NotFoundError(
resourceType,resourceId,message?,cause?):NotFoundError
Defined in: errors.ts:268
Parameters ​
resourceType ​
resourceId ​
string
message? ​
string
cause? ​
Error
Returns ​
NotFoundError
Overrides ​
Properties ​
cause? ​
readonlyoptionalcause:Error
Defined in: errors.ts:108
Original error that caused this error
Inherited from ​
code ​
readonlycode:AgentickErrorCode
Defined in: errors.ts:102
Unique error code for programmatic handling
Inherited from ​
details ​
readonlydetails:Record<string,unknown>
Defined in: errors.ts:105
Additional error details
Inherited from ​
resourceId ​
readonlyresourceId:string
Defined in: errors.ts:266
Identifier of the resource
resourceType ​
readonlyresourceType:ResourceType
Defined in: errors.ts:263
Type of resource that was not found
Methods ​
fromJSON() ​
staticfromJSON(json):AgentickError
Defined in: errors.ts:169
Create error from serialized format
Parameters ​
json ​
Returns ​
Inherited from ​
toJSON() ​
toJSON():
SerializedAgentickError
Defined in: errors.ts:137
Serialize error for transport (JSON-safe)