Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#616 from catenax-ng/feature/TRI-1…
Browse files Browse the repository at this point in the history
…657-change-error-detail

feat(impl):[TRI-1657] adjustments after review
  • Loading branch information
ds-alexander-bulgakov authored Oct 31, 2023
2 parents d1252b8 + 86404f3 commit 9dc4d48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static SupplyChainImpacted jobContainsIncidentBPNSs(
final PartSiteInformationAsPlanned partSiteInformationAsPlanned, final List<String> incidentBPNs)
throws InvalidAspectTypeFormatException {
if (partSiteInformationAsPlanned.sites().stream().anyMatch(site -> site.catenaXSiteId() == null)) {
throw new InvalidAspectTypeFormatException("Site does not contain catenaXSiteId.");
throw new InvalidAspectTypeFormatException("'PartSiteInformationAsPlanned' exists, but catenaXSiteId could not be found.");
}
final List<String> siteIds = partSiteInformationAsPlanned.getCatenaXSiteId();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ void shouldCreateTombstoneWhenSiteIdIsMissing() throws EdcClientException {
final Optional<BpnInvestigationJob> job = bpnInvestigationJobCache.findByJobId(jobId);
assertThat(job).isPresent();
assertThat(job.get().getJobSnapshot().getTombstones()).hasSize(1);
assertThat(job.get().getJobSnapshot().getTombstones().get(0).getProcessingError().getErrorDetail()).isEqualTo("Site does not contain catenaXSiteId.");
assertThat(job.get().getJobSnapshot().getTombstones().get(0).getProcessingError().getErrorDetail()).isEqualTo("'PartSiteInformationAsPlanned' exists, but catenaXSiteId could not be found.");
}

private void createMockForJobIdAndShell(final UUID mockedJobId, final String mockedShell,
Expand Down
2 changes: 1 addition & 1 deletion local/testing/api-tests/irs-api-tests.tavern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ stages:
- function: local.testing.api-tests.tavern_helpers:supplyChainImpacted_is_Unknown
- function: local.testing.api-tests.tavern_helpers:tombstone_for_EssValidation_are_correct
extra_kwargs:
expectedTombstone: "Site does not contain catenaXSiteId."
expectedTombstone: "'PartSiteInformationAsPlanned' exists, but catenaXSiteId could not be found."
headers:
content-type: application/json

Expand Down

0 comments on commit 9dc4d48

Please sign in to comment.