Closed Maimer closed 8 months ago
@phoenixy1 thoughts on this?
Thanks or the PR! I'm not really a rubyist -- I'll ask around internally for review but I would also appreciate opinions on this change from others users of this library. Cc: @kyledcline @ctlevi @enriquez @pradyumna2905 @bdewater
+1 to this, it’s easier and idiomatic to rescue a specific subclass rather than matching on a string message.
ok, sounds like the people approve! I'll put this into the queue to work on -- hopefully we can get it in for the next clib release.
@Maimer I tried importing this upstream but the test suite will not run with this change and generates the following error:
/usr/src/app/lib/plaid/api_client.rb:26:in `<class:ApiClient>': uninitialized constant Plaid::ApiClient::ApiError (NameError)
Can you fix whatever it's missing (or give instructions on the fix it needs, if it's not part of the published clib)? Thanks!
@Maimer I tried importing this upstream but the test suite will not run with this change and generates the following error:
/usr/src/app/lib/plaid/api_client.rb:26:in `<class:ApiClient>': uninitialized constant Plaid::ApiClient::ApiError (NameError)
Can you fix whatever it's missing (or give instructions on the fix it needs, if it's not part of the published clib)? Thanks!
I'll take a look at this and hopefully have a fix for you soon.
This has been merged into upstream and should be released with the next scheduled ruby client library release!
This should be backwards compatible with the existing code as the new errors inherit from
ApiError
and maintain the same string signature of the previous errors.Addresses the following issue: https://github.com/plaid/plaid-ruby/issues/428
@phoenixy1