Skip to content

Commit

Permalink
ALS-7810: Handle errors better
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Nov 19, 2024
1 parent 24519b8 commit 4826851
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,14 @@ public void writeHeader(String[] data) {
}

private void writeDrsUris() {
Map<String, Concept> conceptMap = dictionaryService.getConcepts(fields).stream()
.collect(Collectors.toMap(Concept::conceptPath, Function.identity()));
GenericRecord entityRecord = new GenericData.Record(entitySchema);
GenericRecord entityRecord = new GenericData.Record(entitySchema);;
Map<String, Concept> conceptMap = Map.of();
try {
conceptMap = dictionaryService.getConcepts(fields).stream()
.collect(Collectors.toMap(Concept::conceptPath, Function.identity()));
} catch (RuntimeException e) {
log.error("Error fetching DRS URIs from dictionary service");
}

for (String field : fields) {
GenericRecord drsUriData = new GenericData.Record(drsUriSchema);
Expand Down

0 comments on commit 4826851

Please sign in to comment.