> @@ -59,7 +59,11 @@ public void handleError(final HttpCommand command, final 
> HttpResponse response)
>              break;
>           case 413:
>           case 503:
> -            exception = new 
> InsufficientResourcesException(response.getMessage(), exception);
> +               // if nothing (default message was OK) was parsed from 
> command executor, assume it was an 503 (Maintenance) html response.
> +               if (response.getMessage().equals( "OK" )) 
> +                  exception = new RuntimeException("The ProfitBricks team is 
> currently carrying out maintenance." );

Better propagate an `HttpResponseException` (with your custom message) so users 
have a better context to determine the cause of the failure.

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

Reply via email to