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

EndStruct: Allow empty body not to return json failure #185

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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