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

Wallet&hyphen;layer error with both programmatic and user&hyphen;facing information&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct WalletError;
----

== Description

Wallet methods should return a specific WalletErrorCode only when callers can handle that condition differently&period; Otherwise, use WalletErrorCode&colon;&colon;GenericError and describe the failure in `message`&period;

== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:wallet/WalletError/code.adoc[`code`] 
| Machine&hyphen;readable error code for callers that need programmatic handling&period;
| xref:wallet/WalletError/message.adoc[`message`] 
| User&hyphen;facing translated error message
|===



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