summaryrefslogtreecommitdiffstats
path: root/cadi
diff options
context:
space:
mode:
Diffstat (limited to 'cadi')
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/ErrMessage.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/ErrMessage.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/ErrMessage.java
index 55421262..42efd89b 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/ErrMessage.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/ErrMessage.java
@@ -88,9 +88,13 @@ public class ErrMessage {
public StringBuilder toMsg(StringBuilder sb, Error err) {
sb.append(err.getMessageId());
sb.append(' ');
- String[] vars = new String[err.getVariables().size()];
+ Object[] vars = new String[err.getVariables().size()];
err.getVariables().toArray(vars);
Vars.convert(sb, err.getText(),vars);
return sb;
}
+
+ public Error getError(Future<?> future) throws APIException {
+ return errDF.newData().in(TYPE.JSON).load(future.body()).asObject();
+ }
}