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

The action was blocked by a policy: either a local SDK safety limit (spend caps, allowed operations) or an on-chain account/subnet policy (e.g. the destination rejects locked alpha).

For local policies, raise or remove the limit in your configuration. for on-chain policies, change the recipient/settings or ask the counterparty to opt in — the error name says which.

## 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                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`AccountRejectsLockedAlpha`](/docs/errors/chain/AccountRejectsLockedAlpha)       | Locked alpha was being transferred to a coldkey whose `AccountFlags` do not have the accept-locked-alpha bit set, e.g. during a lock transfer or coldkey swap of locks. Check the destination coldkey's `AccountFlags` storage and have the recipient opt in to receiving locked alpha before retrying.                                                                                                       |
| [`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).
