Skip to content

Commit

Permalink
672: Set the receiver to null if the RS history API has no receivers …
Browse files Browse the repository at this point in the history
…determined yet
  • Loading branch information
halprin committed Jan 9, 2024
1 parent 303d4b4 commit 4631b96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ String getReceiverName(String responseBody) throws FormatterProcessingException
Map<?, ?> destination = (Map<?, ?>) destinations.get(0);
organizationId = destination.get("organization_id").toString();
service = destination.get("service").toString();
} catch (IndexOutOfBoundsException e) {
// the destinations have not been determined yet by RS
return null;
} catch (Exception e) {
throw new FormatterProcessingException(
"Unable to extract receiver name from response due to unexpected format", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ package gov.hhs.cdc.trustedintermediary.etor.metadata

import gov.hhs.cdc.trustedintermediary.context.TestApplicationContext
import gov.hhs.cdc.trustedintermediary.etor.RSEndpointClient
import gov.hhs.cdc.trustedintermediary.etor.orders.Order
import gov.hhs.cdc.trustedintermediary.etor.orders.OrderConverter
import gov.hhs.cdc.trustedintermediary.external.hapi.HapiOrderConverter
import gov.hhs.cdc.trustedintermediary.external.jackson.Jackson
import gov.hhs.cdc.trustedintermediary.external.reportstream.ReportStreamEndpointClientException
import gov.hhs.cdc.trustedintermediary.wrappers.formatter.Formatter
import gov.hhs.cdc.trustedintermediary.wrappers.formatter.FormatterProcessingException
import gov.hhs.cdc.trustedintermediary.wrappers.formatter.TypeReference

import java.time.Instant
import spock.lang.Specification

Expand Down

0 comments on commit 4631b96

Please sign in to comment.