diff --git a/internal/driver/nodeserver_helpers.go b/internal/driver/nodeserver_helpers.go index 86cf3e2b..a672ea23 100644 --- a/internal/driver/nodeserver_helpers.go +++ b/internal/driver/nodeserver_helpers.go @@ -179,7 +179,7 @@ func (ns *NodeServer) findDevicePath(ctx context.Context, key linodevolumes.Lino // If no device path is found, return an error. if devicePath == "" { - return "", errInternal("Unable to find device path out of attempted paths: %v", devicePaths) + return "", errNotFound("Unable to find device path out of attempted paths: %v", devicePaths) } // If a device path is found, return it. diff --git a/internal/driver/nodeserver_helpers_test.go b/internal/driver/nodeserver_helpers_test.go index b33abaff..7c97e2c2 100644 --- a/internal/driver/nodeserver_helpers_test.go +++ b/internal/driver/nodeserver_helpers_test.go @@ -226,7 +226,7 @@ func TestNodeServer_findDevicePath(t *testing.T) { dUtils.EXPECT().VerifyDevicePath(gomock.Any()).Return("", nil) }, wantDevicePath: "", - wantErr: errInternal("Unable to find device path out of attempted paths: [some/path]"), + wantErr: errNotFound("Unable to find device path out of attempted paths: [some/path]"), }, { name: "Success",