APIException parsing in C#

I searched for this topic but couldn’t find it. Sorry if it has been discussed.
When i call the CreatePaymentAsync and get an exception.
How do you parse the exception in C#. My test case is an invalid CCV.
I have a webpage that uses the Square SDK.
I want to report the error to the webpage.

The APIException.Errors is -

[0] = {Error : (Category = PAYMENT_METHOD_ERROR, Code = VOICE_FAILURE, Detail = Authorization error: ‘VOICE_FAILURE’, Field = null)}
[1] = {Error : (Category = PAYMENT_METHOD_ERROR, Code = CVV_FAILURE, Detail = Authorization error: ‘CVV_FAILURE’, Field = null)}

APIException.Errors is a List
The List can be traversed without converting to Json.