diff --git a/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestrator.java b/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestrator.java index cb2331cbf..4878fd304 100644 --- a/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestrator.java +++ b/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestrator.java @@ -221,6 +221,10 @@ String[] getReceiverAndStatus(String responseBody) throws FormatterProcessingExc } PartnerMetadataStatus ourStatusFromReportStreamStatus(String rsStatus) { + if (rsStatus == null) { + return PartnerMetadataStatus.PENDING; + } + return switch (rsStatus) { case "Error", "Not Delivering" -> PartnerMetadataStatus.FAILED; case "Delivered" -> PartnerMetadataStatus.DELIVERED; diff --git a/etor/src/test/groovy/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestratorTest.groovy b/etor/src/test/groovy/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestratorTest.groovy index b400fd3ac..5c0af8931 100644 --- a/etor/src/test/groovy/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestratorTest.groovy +++ b/etor/src/test/groovy/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestratorTest.groovy @@ -462,5 +462,11 @@ class PartnerMetadataOrchestratorTest extends Specification { then: ourStatus == PartnerMetadataStatus.PENDING + + when: + ourStatus = PartnerMetadataOrchestrator.getInstance().ourStatusFromReportStreamStatus(null) + + then: + ourStatus == PartnerMetadataStatus.PENDING } }