Skip to content

Commit

Permalink
SD-587 Add extra conditions to handle the MissingNode. (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
preetamnpr authored Nov 26, 2024
1 parent 8ea8632 commit 500f1ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public JsonNode asPersistentState() {

public static PersistableCarrierBooking fromPersistentStore(JsonNodeMap jsonNodeMap, String carrierBookingRequestReference) {
var data = jsonNodeMap.load(carrierBookingRequestReference);
if (data == null) {
if (data == null || data.isMissingNode() || !data.isObject()) {
throw new IllegalArgumentException("Unknown CBRR: " + carrierBookingRequestReference);
}
return fromPersistentStore(data);
Expand Down

0 comments on commit 500f1ca

Please sign in to comment.