How do I get to the content of Refit.ApiException?
Depending on what the inner content is, I want to let the user know how to proceed. So I see that thrown exception has the following content ...
Content "{\"error\":\"invalid_grant\",\"error_description\":\"The user name or password is incorrect.\"}"
The question is, how do I access that?
You can add one catch block for ApiException. and you can get content from this catch block. See below:
catch (ApiException ex)
{
var content = ex.GetContentAs<Dictionary<String, String>>();
Debug.WriteLine(ex.Message);
}