-
Notifications
You must be signed in to change notification settings - Fork 73
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
All API calls failing due to JSON parse errors #47
Comments
We had JSON::Parser errors appear starting yesterday, too. They are no longer appearing, but we would be interested to know why the behaviour changed briefly yesterday, and if a more permanent gem fix is required. |
I had issue with parsing JSON, but the reason was that httpaty gem not decoding response when you set aceept-encoding header. It happens because since ruby 2 Net::Http encode/decode it by default, and you shouldn't add this header. |
Is this the same as #58 |
Is the problem back? I'm getting:
ruby 2.2.4 |
I solved the issue above. The error was the shape of my payload, and the error message was totally misleading |
@marcomarcianesi please could you explain what you mean by "shape of my payload"? I'm getting the same message even with very simple payloads. Many thanks |
I'm also getting the same |
For others experiencing this, I tried some of the ideas in this thread, however what worked for me was to just go back to |
@rscherf which version were you using earlier? Also, could you give details about the error you were getting? |
@tusharm we were using
|
Got the same error, the problem was in |
As of today, all API calls using this gem started to fail due to JSON parse errors which were caused by the UTF8 BOM which you apparently have added to every response.
I worked around this by patching the gem / stripping the BOM out in case the initial parsing fails.
If this is an intended / permanent change to your API I could provide a proper fix / pull request.
Cheers,
Jens
The text was updated successfully, but these errors were encountered: