From 7fbb5ff46f74f5ea421a76eadf49513d82cf9be9 Mon Sep 17 00:00:00 2001 From: Arne Georg Gleditsch Date: Tue, 13 Nov 2012 13:50:30 +0100 Subject: [PATCH] Errors from the DynamoDB service seems to (also) use the key "Message" (uppercase initial letter) to communicate descriptive error messages. --- .../java/com/amazonaws/transform/JsonErrorUnmarshaller.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/amazonaws/transform/JsonErrorUnmarshaller.java b/src/main/java/com/amazonaws/transform/JsonErrorUnmarshaller.java index 404aae85d21c..395053ba62c7 100644 --- a/src/main/java/com/amazonaws/transform/JsonErrorUnmarshaller.java +++ b/src/main/java/com/amazonaws/transform/JsonErrorUnmarshaller.java @@ -43,6 +43,9 @@ public String parseMessage(JSONObject json) throws Exception { if (json.has("message")) { message = json.getString("message"); } + else if (json.has("Message")) { + message = json.getString("Message"); + } return message; }