Skip to content
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

Support blank API response in exception handling #59

Open
HyperDanTabist opened this issue Jan 4, 2024 · 0 comments
Open

Support blank API response in exception handling #59

HyperDanTabist opened this issue Jan 4, 2024 · 0 comments

Comments

@HyperDanTabist
Copy link

I've received a few errors originating from this line https://github.com/voucherifyio/voucherify-ruby-sdk/blob/master/lib/voucherify/client.rb#L145

unexpected token at ''
/usr/local/bundle/gems/json-2.6.3/lib/json/common.rb:216:in `parse',
/usr/local/bundle/gems/json-2.6.3/lib/json/common.rb:216:in `parse',
/usr/local/bundle/gems/voucherify-4.1.0/lib/voucherify/client.rb:145:in `initialize',
/usr/local/bundle/gems/voucherify-4.1.0/lib/voucherify/client.rb:93:in `new',
...

It appears that the error response is empty and the client cannot handle empty error responses. I've not be able to discover what is causing the empty error response. I can't find the request in the Voucherify API audit logs, so I suspect the request doesn't reach Voucherify. But it will help if the client can gracefully handle errors with empty responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant