-
Notifications
You must be signed in to change notification settings - Fork 137
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
A JSON text must at least contain two octets! #101
Comments
this is a server error from parse as per the 502 response code. it was retried so hopefully it succeeded? in any case this isn't a client bug |
"A JSON text must at least contain two octets!" is tech talk for "The JSON library got an empty string but expected some JSON, at the very least an It might be helpful if the client would encapsulate this and instead raise an error something like |
I'm fine with this. Wanna send a PR? |
this one is actually logging of a retry, but it would be indeed be re-raised as JSON::ParserError if retries were exhausted. it would probably be preferable to encapsulate all server errors (5xx, timeout, patron, whatever) under Parse::ServerError as long as it captured the cause |
I'm afraid I don't have the time to make a pull request at the moment. Possibly later, if we do a "handle Parse errors gracefully" sprint. |
Hello, I have the same issue as you had. params = {:first_name => "John", :last_name => "Smith"} uri = URI.parse(make_uri("person/" + id.to_s))
end JSON.parse @response.body I hope you would like to help me with any solution. Best regards, John |
I think this might be an issue in the JSON parser?
The text was updated successfully, but these errors were encountered: