> + * Handle errors and propagate exception
> + */
> +public class EtcdErrorHandler implements HttpErrorHandler {
> +   @Resource
> +   protected Logger logger = Logger.NULL;
> +
> +   public void handleError(HttpCommand command, HttpResponse response) {
> +
> +      String message = parseMessage(response);
> +      Exception exception = null;
> +      try {
> +
> +         message = message != null ? message
> +               : String.format("%s -> %s", 
> command.getCurrentRequest().getRequestLine(), response.getStatusLine());
> +
> +         switch (response.getStatusCode()) {

I've seen that requests with malformed urls return a 400. Consider catching it 
here and propagating an `IllegalArgumentException`, as this is the jclouds 
convention.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/196/files#r36681869

Reply via email to