Description
Is your feature request related to a problem? Please describe.
When building an InputStream with Files.newInputStream(myPath) from a Azure Blob Storage using azure-storage-blob-nio, if the blob does not exist, the exception thrown by AzureFileSystemProvider is IOException with the message:
Path either does not exist or points to a directory.Path must point to a file. Path: my_directory/my_path
Describe the solution you'd like
As according to the Blob API errors, there is a BlobNotFound error, which is obviously 404 HTTP code, it would be quite normal to expect a FileNotFound exception in return when the blob does not exist.
Describe alternatives you've considered
Solution I have used is to parse the error message and throw a FileNotFoundException if it contains a part of the message mentioned above and if not rethrow the _IOException
Additional context
- Azure Storage Blob NIO version : 12.0.0-beta.31
- Java 21