Update BMC dump response message and fix code

Change-Id: I66e8dbfcc45145e5ef7ed72c6d89136448df4af0
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/dump_utils.robot b/lib/dump_utils.robot
index 140338e..02e263e 100644
--- a/lib/dump_utils.robot
+++ b/lib/dump_utils.robot
@@ -67,25 +67,20 @@
     # Description of Argument(s):
     # resp   Response object from action/Create Dump attempt.
     #        Example object if there are too many dumps:
-    #        {
+    #       {
     #           "data": {
-    #              "description": "Internal Server Error",
-    #              "exception": "'Dump not captured due to a cap.'",
-    #              "traceback": [
-    #              "Traceback (most recent call last):",
-    #                ...
-    #              "DBusException: Create.Error.QuotaExceeded"
-    #                           ]
-    #              },
-    #           "message": "500 Internal Server Error",
+    #               "description": "xyz.openbmc_project.Dump.Create.Error.QuotaExceeded"
+    #           },
+    #           "message": "Dump not captured due to a cap.",
     #           "status": "error"
-    #        }
+    #       }
 
     # If dump was created normally, return the dump_id number.
     Run Keyword If  '${resp.status_code}' == '${HTTP_OK}'
     ...  Run Keyword And Return  Get The Dump Id  ${resp}
 
-    ${exception}=  Set Variable  ${resp.json()['data']['exception']}
+    ${json}=  To JSON   ${resp.content}
+    ${exception}=  Set Variable  ${json["message"]}
     ${at_capacity}=  Set Variable  Dump not captured due to a cap
     ${too_many_dumps}=  Evaluate  $at_capacity in $exception
     Printn