Skip to content

GuardrailExecutionError

Error thrown when a guardrail execution fails.

new GuardrailExecutionError(
message,
error,
state?): GuardrailExecutionError
Parameter Type

message

string

error

Error

state?

RunState<any, Agent<any, any>>

GuardrailExecutionError

AgentsError.constructor

error: Error;

message: string;

AgentsError.message


name: string;

AgentsError.name


optional stack: string;

AgentsError.stack


optional state: RunState<any, Agent<any, any>>;

AgentsError.state


static optional prepareStackTrace: (err, stackTraces) => any;

Optional override for formatting stack traces

Parameter Type

err

Error

stackTraces

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

AgentsError.prepareStackTrace


static stackTraceLimit: number;

AgentsError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameter Type

targetObject

object

constructorOpt?

Function

void

AgentsError.captureStackTrace