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

Unhandled JSON parse exception when handling malformed responses from ContentStack API #128

Open
vitorsdcs opened this issue Jul 26, 2024 · 4 comments
Assignees

Comments

@vitorsdcs
Copy link

The SDK seems to be throwing an unhandled exception when ContentStack API returns a non-JSON response.

The following error is thrown during execution of CSHttpConnection.java#L264:

JSONException: A JSONObject text must begin with '{' at 0 [character 1 line 1]

In case of malformed responses from ContentStack API, I would expect the ResultCallback to be invoked and contain details about the error, instead of an exception being thrown.

@reeshika-h
Copy link
Contributor

Hey @vitorsdcs thanks for raising this, we will look into the issue .

cc: @cs-raj @netrajpatel @shafeeqd959

@reeshika-h
Copy link
Contributor

Hey @vitorsdcs kindly check out the latest version. Do let us know if you face any further issues.

@goetas
Copy link

goetas commented Dec 2, 2024

Hi, I work on the same team as @vitorsdcs , the issue is still happening on the 2.0.0 release. Did not upgrade to 2.0.1 due to #148

@reeshika-h
Copy link
Contributor

Hi @goetas! Just a heads-up that we'll be releasing the fixes for the critical bug mentioned in #148. This issue (#128) has been addressed in version 2.0.1. We'll keep you posted.

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

6 participants