From c9d1ef6d117b5561c66ba28219b1aaa475b1e8c2 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 2 Jan 2011 18:20:10 +0100 Subject: [PATCH] better message on auth error in aws --- .../org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/core/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java b/aws/core/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java index ec6b39862b..db11c9832d 100755 --- a/aws/core/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java +++ b/aws/core/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java @@ -99,13 +99,13 @@ public class ParseAWSErrorFromXmlContent implements HttpErrorHandler { .getCode().endsWith(".Duplicate"))) || (message != null && (message.indexOf("already exists") != -1))) exception = new IllegalStateException(message, exception); else if (error != null && error.getCode() != null && error.getCode().equals("AuthFailure")) - exception = new AuthorizationException(exception.getMessage(), exception); + exception = new AuthorizationException(message, exception); else if (message != null && message.indexOf("Failed to bind the following fields") != -1)// Nova exception = new IllegalArgumentException(message, exception); break; case 401: case 403: - exception = new AuthorizationException(exception.getMessage(), exception); + exception = new AuthorizationException(message, exception); break; case 404: if (!command.getCurrentRequest().getMethod().equals("DELETE")) {