> + exception = new IllegalStateException(response.getMessage(),
> exception);
> + break;
> + case 404:
> + case 410:
> + if (!command.getCurrentRequest().getMethod().equals("DELETE"))
> + exception = new
> ResourceNotFoundException(response.getMessage(), exception);
> + break;
> + case 413:
> + case 503:
> + // 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 HttpResponseException("The OneAndOne team
> is currently carrying out maintenance.", command, response);
> + else
> + exception = new
> InsufficientResourcesException(response.getMessage(), exception);
> + break;
> + }
An exception must be set y default, otherwise we could be setting a null one if
none of the codes above is returned. Let's better cover that case.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/275/files/0767d011a984011133c9e34b3389b449ca0756cd#r68670326