[#wallet-WalletErrorCode] = xref:wallet.adoc[wallet]::WalletErrorCode :relfileprefix: ../ :mrdocs: Machine‐readable wallet error codes. == Synopsis Declared in `<wallet/types.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- enum class WalletErrorCode : int; ---- == Description [NOTE] ==== Add new codes only when callers need to handle the condition differently. For errors that should only be displayed to the user, use WalletErrorCode::GenericError and provide the user‐facing details in WalletError::message. ==== == Members [cols="1,4"] |=== | Name| Description | `GenericError` | Generic wallet error. Callers may present the accompanying message to the user. | `UnlockNeeded` | The wallet is locked and the operation requires access to private keys. Callers may ask the user to unlock the wallet and retry the operation. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#