Showing
1 changed file
with
3 additions
and
3 deletions
@@ -118,7 +118,7 @@ public class TbRestApiCallNode implements TbNode { | @@ -118,7 +118,7 @@ public class TbRestApiCallNode implements TbNode { | ||
118 | } | 118 | } |
119 | 119 | ||
120 | private TbMsg processResponse(TbContext ctx, TbMsg origMsg, ResponseEntity<String> response) { | 120 | private TbMsg processResponse(TbContext ctx, TbMsg origMsg, ResponseEntity<String> response) { |
121 | - TbMsgMetaData metaData = new TbMsgMetaData(); | 121 | + TbMsgMetaData metaData = origMsg.getMetaData(); |
122 | metaData.putValue(STATUS, response.getStatusCode().name()); | 122 | metaData.putValue(STATUS, response.getStatusCode().name()); |
123 | metaData.putValue(STATUS_CODE, response.getStatusCode().value()+""); | 123 | metaData.putValue(STATUS_CODE, response.getStatusCode().value()+""); |
124 | metaData.putValue(STATUS_REASON, response.getStatusCode().getReasonPhrase()); | 124 | metaData.putValue(STATUS_REASON, response.getStatusCode().getReasonPhrase()); |
@@ -127,7 +127,7 @@ public class TbRestApiCallNode implements TbNode { | @@ -127,7 +127,7 @@ public class TbRestApiCallNode implements TbNode { | ||
127 | } | 127 | } |
128 | 128 | ||
129 | private TbMsg processFailureResponse(TbContext ctx, TbMsg origMsg, ResponseEntity<String> response) { | 129 | private TbMsg processFailureResponse(TbContext ctx, TbMsg origMsg, ResponseEntity<String> response) { |
130 | - TbMsgMetaData metaData = origMsg.getMetaData().copy(); | 130 | + TbMsgMetaData metaData = origMsg.getMetaData(); |
131 | metaData.putValue(STATUS, response.getStatusCode().name()); | 131 | metaData.putValue(STATUS, response.getStatusCode().name()); |
132 | metaData.putValue(STATUS_CODE, response.getStatusCode().value()+""); | 132 | metaData.putValue(STATUS_CODE, response.getStatusCode().value()+""); |
133 | metaData.putValue(STATUS_REASON, response.getStatusCode().getReasonPhrase()); | 133 | metaData.putValue(STATUS_REASON, response.getStatusCode().getReasonPhrase()); |
@@ -136,7 +136,7 @@ public class TbRestApiCallNode implements TbNode { | @@ -136,7 +136,7 @@ public class TbRestApiCallNode implements TbNode { | ||
136 | } | 136 | } |
137 | 137 | ||
138 | private TbMsg processException(TbContext ctx, TbMsg origMsg, Throwable e) { | 138 | private TbMsg processException(TbContext ctx, TbMsg origMsg, Throwable e) { |
139 | - TbMsgMetaData metaData = origMsg.getMetaData().copy(); | 139 | + TbMsgMetaData metaData = origMsg.getMetaData(); |
140 | metaData.putValue(ERROR, e.getClass() + ": " + e.getMessage()); | 140 | metaData.putValue(ERROR, e.getClass() + ": " + e.getMessage()); |
141 | if (e instanceof HttpClientErrorException) { | 141 | if (e instanceof HttpClientErrorException) { |
142 | HttpClientErrorException httpClientErrorException = (HttpClientErrorException)e; | 142 | HttpClientErrorException httpClientErrorException = (HttpClientErrorException)e; |