diff --git a/share/sql/sql.go b/share/sql/sql.go index c12bce9..a20298d 100644 --- a/share/sql/sql.go +++ b/share/sql/sql.go @@ -329,6 +329,13 @@ func (m *mgr) getPath(ctx context.Context, resID *provider.ResourceId) (string, return "", err } + if res.Status.Code == rpc.Code_CODE_OK { + return res.GetPath(), nil + } else if res.Status.Code == rpc.Code_CODE_NOT_FOUND { + return "", errtypes.NotFound(resID.OpaqueId) + } + return "", errors.New(res.Status.Code.String() + ": " + res.Status.Message) + return res.GetPath(), nil }