- Updated logic to throw exception when response code is not
2XX, previously it was checking for 201 CREATED
Issue-ID: CPS-955
Change-Id: I45cc53cf5b0e603755a75dbd089ead0eb87e5970
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
"Parsing error occurred while converting given cm-handles object list to JSON ");
}
final ResponseEntity<String> responseEntity = ncmpRestClient.registerCmHandlesWithNcmp(cmHandlesJson);
- if ((responseEntity.getStatusCode() != HttpStatus.CREATED)) {
+ if (!responseEntity.getStatusCode().is2xxSuccessful()) {
throw new CmHandleRegistrationException(responseEntity.getBody());
}
}