mirror of https://github.com/apache/jclouds.git
Fixed NPE in error handler
This commit is contained in:
parent
ef66989727
commit
9c40c3a34d
|
@ -53,7 +53,7 @@ public class VCloudDirectorErrorHandler implements HttpErrorHandler {
|
|||
String message = data != null
|
||||
? new String(data)
|
||||
: String.format("%s -> %s", command.getCurrentRequest().getRequestLine(), response.getStatusLine());
|
||||
Exception exception = new HttpResponseException(command, response, response.getPayload().getContentMetadata().getContentType());
|
||||
Exception exception = new HttpResponseException(command, response, message);
|
||||
|
||||
// Try to create a VCloudDirectorException from XML payload
|
||||
if (response.getPayload().getContentMetadata().getContentType().startsWith(VCloudDirectorMediaType.ERROR)) {
|
||||
|
|
Loading…
Reference in New Issue