Skip to content

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

@vitorsdcs

Description

@vitorsdcs

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions