Skip to content
docs

PolicyViolationError

Defined in: kit/src/policies.ts:243

Thrown before anything is signed when a write breaks a rule in Policies. A rejected confirm throws UserRejectedError from core instead.

  • Error

new PolicyViolationError(policy, message): PolicyViolationError

Defined in: kit/src/policies.ts:250

"chain" | "maxFee" | "allowlist" | "blocklist" | "method"

string

PolicyViolationError

Error.constructor

readonly policy: "chain" | "maxFee" | "allowlist" | "blocklist" | "method"

Defined in: kit/src/policies.ts:249

The rule that refused the write. chain means the account’s chain id is unknown, so no rule could be matched. method means the method is not part of the write surface the policies can read (see GUARDED_WRITES).