Update error message to be clearer when using filer.ReadDir for UC Volumes

This commit is contained in:
Shreyas Goenka 2024-01-30 10:51:50 +01:00
parent 5fda017057
commit 551c0277ce
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 3 additions and 3 deletions

View File

@ -63,8 +63,8 @@ type FilesClient struct {
root WorkspaceRootPath
}
func filesNotImplementedError(fn string) error {
return fmt.Errorf("filer.%s is not implemented for the Files API", fn)
func listAPINotAvailableError(fn string) error {
return fmt.Errorf("list API is not yet available for UC Volumes")
}
func NewFilesClient(w *databricks.WorkspaceClient, root string) (Filer, error) {
@ -192,7 +192,7 @@ func (w *FilesClient) Delete(ctx context.Context, name string, mode ...DeleteMod
}
func (w *FilesClient) ReadDir(ctx context.Context, name string) ([]fs.DirEntry, error) {
return nil, filesNotImplementedError("ReadDir")
return nil, listAPINotAvailableError("ReadDir")
}
func (w *FilesClient) Mkdir(ctx context.Context, name string) error {