Skip to content

Commit

Permalink
Merge pull request apache#65 from ABFSDriver/implicitDirReadConflictE…
Browse files Browse the repository at this point in the history
…rror

Enhanced error message for read on implicit Directory
  • Loading branch information
anmolanmol1234 authored Jun 13, 2023
2 parents 28faec1 + 1941177 commit 9b5744f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,8 @@ public AbfsInputStream openFileForRead(final Path path,
throw new AbfsRestOperationException(
AzureServiceErrorCode.PATH_NOT_FOUND.getStatusCode(),
AzureServiceErrorCode.PATH_NOT_FOUND.getErrorCode(),
"openFileForRead must be used with files and not directories",
"openFileForRead must be used with files and not directories. " +
"Attempt made for read on implicit directory.",
null);
} else {
throw e;
Expand Down Expand Up @@ -1282,7 +1283,8 @@ public AbfsInputStream openFileForRead(final Path path,
throw new AbfsRestOperationException(
AzureServiceErrorCode.PATH_NOT_FOUND.getStatusCode(),
AzureServiceErrorCode.PATH_NOT_FOUND.getErrorCode(),
"openFileForRead must be used with files and not directories",
"openFileForRead must be used with files and not directories." +
"Attempt made for read on explicit directory.",
null);
}

Expand Down

0 comments on commit 9b5744f

Please sign in to comment.