> +            case 402:
> +               exception = new IllegalStateException(message, exception);
> +               break;
> +            case 404:
> +               if 
> (!command.getCurrentRequest().getMethod().equals("DELETE")) {
> +                  exception = new ResourceNotFoundException(message, 
> exception);
> +               }
> +               break;
> +            case 405:
> +               exception = new IllegalArgumentException(message, exception);
> +               break;
> +            case 409:
> +               exception = new IllegalStateException(message, exception);
> +               break;
> +            case 500:
> +               exception = null;

Blindly converting 500 responses into *correct* responses is wrong, whether we 
do that on a generic handler or in each method. Do those 500 responses hace 
*any* information of what is going on, in the headers, body or wherever? We 
should use and parse that to do the right thing.

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

Reply via email to