You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where bank_account_id = nil. I understand the error is that the id is nil, but it seems like it should either be caught earlier or have a better exception message.
@JWesorick I agree with making some changes here to better catch this error.
With that being said, this is also the result of manually building hrefs, which we ask API consumers not to do. You should store and use the href attribute supplied in API responses and not manually build them with stored IDs.
So this exception wan't super helpful and also, despite what the exception says, it did happen. I was making a call to fetch a bank account:
Balanced::BankAccount.fetch("/bank_accounts/#{bank_account_id}")
where
bank_account_id = nil
. I understand the error is that the id is nil, but it seems like it should either be caught earlier or have a better exception message.https://github.com/balanced/balanced-ruby/blob/master/lib/balanced/resources/resource.rb#L243
The text was updated successfully, but these errors were encountered: