databricks-sdk-java
databricks-sdk-java copied to clipboard
[ISSUE] - FilesAPI throws NPE when file is not found
Description
I'm trying to use getMetadata method of FilesAPI client, but if file is not found, a Null Pointer Exception is thrown.
Reproduction new WorkspaceClient(config).files().getMetadata("/Volumes/main/default/file-not-found")
Expected behavior When file is not found ( 404 error received from Databricks API) , a Databricks Error with errorCode = "NOT_FOUND" or error code = "RESOURCE_DOES_NOT_EXIST" should be thrown.
Is it a regression? No
Debug Logs
java.lang.NullPointerException: null
at java.base/java.io.Reader.
Other Information
- OS: macOS
- Version: 0.22.0
/assign
@costichiulan Please assign this issue to me