-
Notifications
You must be signed in to change notification settings - Fork 143
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
Exception raised when trying to inspect or get message from Plaid::ApiError #481
Comments
Oh how embarrassing -- it looks like this was introduced in 24.1.0 where we went to ruby 6.3. It looks like, when upgrading the template generator, I accidentally edited the wrong line of the template file, and apparently we don't have any tests that would catch this. I have a PR in progress that should fix the issue in the next clib release. Thank you for the report! |
We are encountering the same error, rolling back to version 23 for now until the fix is released. Thanks for your work here! |
@phoenixy1 I stumbled upon this issue and your suggestion fixed the issue for me. I'm able to inspect the error without the |
This should now be fixed with today's release. Please comment if it is still happening after upgrading! |
We have some specs that simulate
Plaid::ApiError
s by doing something like thisThe problem is when we try to rescue and read the message
An exception is raised
output error: #<NoMethodError: undefined method `+' for {:code=>400, :response_body=>"{\"error_code\":\"INVALID_WEBHOOK_VERIFICATION_KEY_ID\",\"error_type\":\"INVALID_INPUT\"}"}:Hash>
I expect a friendly message instead
"Error message: the server returns an error\nHTTP status code: 400\nResponse body: {\"error_code\":\"INVALID_WEBHOOK_VERIFICATION_KEY_ID\",\"error_type\":\"INVALID_INPUT\"}"
Something changed between v23 and v24 here which is causing the new exception:
https://github.com/plaid/plaid-ruby/blame/80cde7efe279d18e50fe14366be388bec0d3cf53/lib/plaid/api_error.rb#L28C9-L28C9
The text was updated successfully, but these errors were encountered: