Open ThomasLoSG opened 6 months ago
Exception ExceptionFactory(string methodName, IApiResponse response) { var statusCode = (int)response.StatusCode; switch (statusCode) { case 400: return new XeroApiException(statusCode, $"Xero API 400 error calling {(object)methodName} :{(object)response.Content.ToString()}", response.Headers, response.Content); default: return statusCode > 400 ? new XeroApiException(statusCode, $"Xero API error calling {(object)methodName}: {(object)response.Content.ToString()}", response.Headers, response.Content) : (Exception)null; } } var faInstance = new AssetApi() { ExceptionFactory = ExceptionFactory }; List<AssetType> ats = null; Task.Run(async () => { try { ats = await faInstance.GetAssetTypesAsync(token.AccessToken, tenant.TenantId.ToString()); } catch (XeroApiException xe) { } }).Wait();
No error generated but ats remain null
PETOSS-378
Thanks for raising an issue, a ticket has been created to track your request
No error generated but ats remain null