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

Chunked response errors should fail plugin execution #168

Merged
merged 1 commit into from May 15, 2015
Merged

Chunked response errors should fail plugin execution #168

merged 1 commit into from May 15, 2015

Conversation

timkral
Copy link
Contributor

@timkral timkral commented May 15, 2015

This is a pull request to fix this issue: https://github.com/rhuss/docker-maven-plugin/issues/167

I saw that there was already some processing around chunked responses to parse them and log their messages. This just takes it one small step further and throws an exception if the chucked response contains an error (effectively causing the plugin execution to fail).

public interface ChunkedResponseHandler<T> {
void process(T toProcess);
void process(T toProcess) throws DockerAccessException;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the interface contract to allow for exception throwing. DockerAccessException may not be the best choice based on its description, but everything seemed to funnel into it anyway, so I went with that instead of creating a whole new class of exception.

@rhuss
Copy link
Collaborator

rhuss commented May 15, 2015

Looks good to me. Yes, currently there's only DockerAccessException, which I think is ok as an indicator that something during the communication with the docker host failed. I'm not a big fan of large exception hierarchies because tend then to always choose the wrong one anyway ;-).

The fix is applied for 0.11.4 which will be released quite soon.

@rhuss rhuss added the applied label May 15, 2015
@rhuss rhuss added this to the 0.11.4 milestone May 15, 2015
@rhuss rhuss merged commit 6419c3e into fabric8io:master May 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants