# policy_violation (/docs/errors/policy-violation)

The action was blocked locally by a configured safety policy before reaching the chain.

Policies cap what a session is allowed to do (spend limits, allowed operations). this is a deliberate guardrail: if the action is intended, raise or remove the relevant policy limit in your configuration and rerun.

## Remediation [#remediation]

The action exceeds a configured safety policy

## Chain errors [#chain-errors]

The exact chain error names (from the extrinsic receipt) that classify to `policy_violation`; the description says what triggered the failure and where to check. Each name has its own page:

| Chain error                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`KeepStakeBlockedByCollateral`](/docs/errors/chain/KeepStakeBlockedByCollateral) | A hotkey swap with keep\_stake=true was refused because the old hotkey still has standing miner registration collateral. keep\_stake leaves stake on the old key while the UID moves, which would strand the bond. Retry with keep\_stake=false so collateral migrates with the UID; on-chain hotkey lineage maps track the rename for blacklist continuity. Or drain the bond through earned emission first. |

The same explanation is available in the terminal: `btcli explain policy_violation` (or `btcli explain <ChainErrorName>` for one exact chain error).
