We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
PETOSS-378
Sorry, something went wrong.
Thanks for raising an issue, a ticket has been created to track your request
No branches or pull requests
No error generated but ats remain null
The text was updated successfully, but these errors were encountered: