-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
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
BalanceTransactionService.ListAutoPaging Null Reference Exception #1717
Comments
Hi @davetheunissen. Can you share the full stacktrace for the exception? |
Here you go... We are getting the same exception for charges as well.
|
Thanks! I think I know what the bug is. I'll update here once I confirm or if I need more information. |
Actually, can you try the following? It will help me confirm if the issue is what I think it is: var options = new BalanceTransactionListOptions();
foreach (var balanceTransaction in _balanceTransactionService.ListAutoPaging(options))
{
balanceTransactions.Add(balanceTransaction);
} |
Hi @ob-stripe, confirmed the issue is caused by a null options object even though the LastAutoPaging method has a default parameter for the options that accept nulls. |
Thanks @davetheunissen! We will release a fix soon. |
We just released version 27.16.1 which should fix the issue. Thanks for the report, and sorry for the inconvenience! |
Awesome thank you for the super quick response! |
When using the
ListAutoPaging
feature forBalanceTransactions
, the service throws a null reference exception as it tries to go past the number of records in the result set.i.e. the default option is to limit the returned result set to 10 records.
if I run the following, 10 records will be added to my list and the loop will throw the exception when trying to access an 11th record.
OSVersion: Windows 10 : Build 17134
.NETVersion : dotnet core 2.1
StripeVersion: 27.16.0
The text was updated successfully, but these errors were encountered: