Skip to content

CustomInvestigationOptions ​

ts
type CustomInvestigationOptions = object;

Options for investigating a failure with your own handler instead of an AI provider.

Properties ​

investigate ​

ts
investigate: (ctx, options) => Promise<unknown>;

Custom investigation handler; replaces the built-in AI provider flow when provided. Its resolved value is returned from the decorated method in place of the error.

Parameters ​

ctx ​

InvestigationContext

options ​
signal ​

AbortSignal

Returns ​

Promise<unknown>


customErrors? ​

ts
optional customErrors?: CustomInvestigationErrorDefinition[];

Error classes that, when thrown by investigate, propagate instead of the method's original error.