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

Handle empty content better #862

Merged
merged 5 commits into from
Sep 10, 2015
Merged

Conversation

haacked
Copy link
Contributor

@haacked haacked commented Aug 7, 2015

Fixes #836

If we get a 204 No Content response to GetQueuedContent, we should return an empty collection rather than throw an exception.

haacked added 5 commits August 7, 2015 10:41
We didn't handle the 204 response properly for the `StatisticsClient`.
Now we do.

Fixes #836
Also refactored the code to be a bit easier to understand and have less
calculations.
Most calls to `GetQueuedOperation` are used to queue up an operation
that'll return a collection in a subsequent call. In the case that the
API returns No Content, we want to return an empty collection. This
refactoring embeds that last bit of logic into `GetQueuedOperation`
rather than making every caller have to do it.
It doesn't follow the pattern of most of our other clients.
@haacked
Copy link
Contributor Author

haacked commented Sep 9, 2015

@shiftkey you ok with this?

@shiftkey
Copy link
Member

shiftkey added a commit that referenced this pull request Sep 10, 2015
@shiftkey shiftkey merged commit 82a3e76 into master Sep 10, 2015
@shiftkey shiftkey deleted the haacked/836-handle-empty-content branch September 10, 2015 02:34
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.

2 participants