Skip to content

Commit

Permalink
modify file path and make error more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
pluckyswan committed Jan 7, 2025
1 parent ef3d035 commit 897e2fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public List<HL7FileStream> fetchFiles() {
String rse2ELocalInputFilePath = System.getenv("RSE2E_LOCAL_INPUT_FILE_PATH");
if (rse2ELocalInputFilePath == null || rse2ELocalInputFilePath.isEmpty()) {
throw new IllegalArgumentException(
"Environment variable RSE2E_LOCAL_INPUT_FILE_PATH is not set");
"Environment variable RSE2E_LOCAL_INPUT_FILE_PATH is not set in azure file fetcher.");
}

List<HL7FileStream> relevantFiles = new ArrayList<>();
Expand All @@ -64,9 +64,9 @@ public List<HL7FileStream> fetchFiles() {
String datePrefix = AzureBlobHelper.buildDatePathPrefix(today);

// TODO - update base on AzureBlobOrganizer
String pathPrefix = datePrefix + "Automated/";
String pathPrefix = datePrefix + "/Automated/";
if (rse2ELocalInputFilePath.contains("GoldenCopy")) {
pathPrefix += datePrefix + "GoldenCopy/";
pathPrefix += datePrefix + "/GoldenCopy/";
}

ListBlobsOptions options = new ListBlobsOptions().setPrefix(pathPrefix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public List<HL7FileStream> fetchFiles() {
String rse2ELocalInputFilePath = System.getenv("RSE2E_LOCAL_INPUT_FILE_PATH");
if (rse2ELocalInputFilePath == null || rse2ELocalInputFilePath.isEmpty()) {
throw new IllegalArgumentException(
"Environment variable RSE2E_LOCAL_INPUT_FILE_PATH is not set");
"Environment variable RSE2E_LOCAL_INPUT_FILE_PATH is not set in local file fetcher.");
}
try (Stream<Path> stream = Files.walk(Paths.get(rse2ELocalInputFilePath))) {
return stream.filter(Files::isRegularFile)
Expand Down

0 comments on commit 897e2fd

Please sign in to comment.