Legacy APPC uses the same topic for both requests and responses.
Unfortunately, when the actor sees the request, thinking it's a
response, it throws an exception because it can't find the status
code. Fixed.
Issue-ID: POLICY-2434
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I6137fb21dbf1149ff2faca2407ba69be0de6d40b
@Override
protected Status detmStatus(String rawResponse, Response response) {
if (response.getStatus() == null) {
- throw new IllegalArgumentException("APP-C response is missing the response status");
+ // no status - this must be a request, not a response - just ignore it
+ logger.info("{}: ignoring request message for {}", getFullName(), params.getRequestId());
+ return Status.STILL_WAITING;
}
ResponseCode code = ResponseCode.toResponseCode(response.getStatus().getCode());
public void testDetmStatusStringResponse() {
final ResponseStatus status = response.getStatus();
- // null status
+ // null status (i.e., it's a Request, not a Response)
response.setStatus(null);
- assertThatIllegalArgumentException().isThrownBy(() -> oper.detmStatus("", response))
- .withMessage("APP-C response is missing the response status");
+ assertEquals(Status.STILL_WAITING, oper.detmStatus("", response));
response.setStatus(status);
// invalid code