See Requests and responses for the error envelope.
Showing errors to users
Showerror.details to the user only when it is a sentence (for example Solde de la boutique insuffisant). Map the code-style values (voucher_not_found, access_denied, something_went_wrong) to your own messages.