Custom error message is not mapped to VoucherifyClientException.
E.g. response:
{
"code":400,
"key":"customer_rules_violated",
"message":"customer does not match validation rules",
"details":"Referral Code cannot be redeemed because of violated validation rules: val_4Rz40vs2mHXZ",
"request_id":"v-0c625e154445522451",
"resource_id":"rf_0c625e15590ee0d561",
"resource_type":"redemption",
"error":{
"message":"Sorry, this code cannot be used by users who have already taken at least one trip."
}
}
Custom error message is not mapped to VoucherifyClientException.
E.g. response:
https://support.voucherify.io/article/264-how-can-i-create-custom-errors From your documentation: The content of the custom error message is going to be returned in the
error
object undermessage
property. https://github.com/voucherifyio/voucherify-dotNET-sdk/blob/master/src/Voucherify/Core/Exceptions/VoucherifyClientException.cs