Custom program error

0x7d12001

Appears in logs as custom program error: 0x7d1

Anchor

ConstraintHasOne

“A has one constraint was violated”

A has_one = field constraint failed: the account's stored field does not equal the address of the account passed under that name.

Common causes

  • Passing a different authority/owner/mint account than the one stored on the account.
  • The account was created for a different user.

How to fix it

  • Fetch the account, read the field named in the constraint and pass that exact address.
  • Name the accounts in the client call carefully; Anchor matches by field name.

Decode another error

Try: