Documentation / @agentick/guardrails / GuardrailDenied
Class: GuardrailDenied ​
Defined in: guardrails/src/errors.ts:6
Error thrown when a guardrail denies a tool execution.
Extends ​
Constructors ​
Constructor ​
new GuardrailDenied(
toolName,reason):GuardrailDenied
Defined in: guardrails/src/errors.ts:7
Parameters ​
toolName ​
string
reason ​
string
Returns ​
GuardrailDenied
Overrides ​
Properties ​
cause? ​
readonlyoptionalcause:Error
Defined in: shared/src/errors.ts:108
Original error that caused this error
Inherited from ​
code ​
readonlycode:AgentickErrorCode
Defined in: shared/src/errors.ts:102
Unique error code for programmatic handling
Inherited from ​
details ​
readonlydetails:Record<string,unknown>
Defined in: shared/src/errors.ts:105
Additional error details
Inherited from ​
guardType? ​
readonlyoptionalguardType:string
Defined in: shared/src/errors.ts:683
Type of guard that denied access
Inherited from ​
toolName ​
readonlytoolName:string
Defined in: guardrails/src/errors.ts:8
Methods ​
denied() ​
staticdenied(reason,details?):GuardError
Defined in: shared/src/errors.ts:706
Create a custom guard denied error
Parameters ​
reason ​
string
details? ​
Record<string, unknown>
Returns ​
Inherited from ​
fromJSON() ​
staticfromJSON(json):AgentickError
Defined in: shared/src/errors.ts:169
Create error from serialized format
Parameters ​
json ​
Returns ​
Inherited from ​
role() ​
staticrole(roles):GuardError
Defined in: shared/src/errors.ts:699
Create a role-based guard error
Parameters ​
roles ​
string[]
Returns ​
Inherited from ​
toJSON() ​
toJSON():
SerializedAgentickError
Defined in: shared/src/errors.ts:137
Serialize error for transport (JSON-safe)