[#wallet-WalletErrorCode]
= xref:wallet.adoc[wallet]::WalletErrorCode
:relfileprefix: ../
:mrdocs:

Machine&hyphen;readable wallet error codes&period;

== Synopsis

Declared in `&lt;wallet&sol;types&period;h&gt;`

[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&period; For errors that should only be displayed to the user, use WalletErrorCode&colon;&colon;GenericError and provide the user&hyphen;facing details in WalletError&colon;&colon;message&period;

====

== Members

[cols="1,4"]
|===
| Name| Description
| `GenericError` 
| Generic wallet error&period; Callers may present the accompanying message to the user&period;
| `UnlockNeeded` 
| The wallet is locked and the operation requires access to private keys&period; Callers may ask the user to unlock the wallet and retry the operation&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
