Skip to content

Conversation

@aerostitch
Copy link

@aerostitch aerostitch commented Apr 3, 2018

Sometimes servers could send back empty body, and when that happens currently, EndStruct() returns a json decoding error which can be confusing.
Instead we could just avoid to unmarshall the body and leave the struct nil.
(I have an app that, depending on the api version, returns a message or not. Fixing that would allow me to have both version of the client work properly and handle real errors coming from bad server output)

Thanks for your time.

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

Successfully merging this pull request may close these issues.

1 participant