response json body is not show when parse error
See original GitHub issue✍️ Describe the bug
response json body is not show
💣 Steps to reproduce
data class SomeData(val someValue: Boolean)
interface SomeService {
@GET("test")
fun config(): Call<SomeData>
}
if server return {"someValue": true}
, i will see it in chucker,
if server return {"someValue": 1}
, i can not see it in chucker, i need it
🔧 Expected behavior
📷 Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Error while parsing JSON Response in REST API Post call
I am using Outsystems 10 and trying to consume a REST API (single method). I have copied and pasted the REST Request and...
Read more >Error while using body.json() for parsing response from http.get()
Tried using body.json() to assign data to an array of object but as it returns a promise tried this. But browser throws error...
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >HTTP status and error codes for JSON | Cloud Storage
Error responses usually include a JSON document in the response body, ... parseError, Could not parse the body of the request according to...
Read more >Parse JSON not showing all columns
And then I'm parsing the JSON response with a schema created from the ... I got the error of a null being returned...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
solved, thks @MiSikora @vbuberen
I’m not quite sure if this was the issue because it should not happen in the first place given the info. I’m not 100% certain if this is the case but it might be that the response body in error cases was not closed in
finally
block or withuse()
function (in OPs code). And nothing was displayed because since3.2.0
we rely on response body being closed in order to update the transaction.More info from @czy1121 is certainly welcome. 😃