spotify/docker-client — pull request #102 by rohansingh (2014-12-10 17:25:25+00:00)
Title: Throw exceptions for image/container not found

In some cases we were not throwing exceptions for a number of methods when
an image or container was not found. There were a few causes:

1. The response from Docker for pulls of nonexistent images changed. Now we
check for both the old and new responses.

2. We were expecting Jersey to throw an exception for all 404 responses.
However, Jersey doesn't process the response status code or throw
exceptions for responses where we don't specify a response entity. This
is the case for requests that we expect to return an empty response.

We now tell Jersey to unmarshal those responses into a java.lang.Object
(which ends up being `null`) so that it will also process the response
status and throw a WebApplicationException on 404, 500, etc.

3. Many DefaultDockerClient methods were trying to catch a
WebApplicationException when calling DefaultDockerClient.request(), but
request() never throws a WebApplicationException. It always wraps them
in DockerRequestException. Those methods are now fixed.

Fixes #101.