mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-29 16:31:20 -05:00
Do not abort search if one space fails
Also make sure to log all errors.
This commit is contained in:
@@ -103,15 +103,18 @@ func (p *Provider) Search(ctx context.Context, req *searchsvc.SearchRequest) (*s
|
||||
ResourceId: space.Root,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
p.logger.Error().Err(err).Str("space", space.Id.OpaqueId).Msg("failed to get patch for grant space root")
|
||||
continue
|
||||
}
|
||||
if gpRes.Status.Code != rpcv1beta1.Code_CODE_OK {
|
||||
return nil, errtypes.NewErrtypeFromStatus(gpRes.Status)
|
||||
p.logger.Error().Interface("status", gpRes.Status).Str("space", space.Id.OpaqueId).Msg("failed to get patch for grant space root")
|
||||
continue
|
||||
}
|
||||
mountpointPrefix = utils.MakeRelativePath(gpRes.Path)
|
||||
sid, oid, err := storagespace.SplitID(mountpointId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
p.logger.Error().Err(err).Str("space", space.Id.OpaqueId).Str("mountpointId", mountpointId).Msg("invalid mountpoint space id")
|
||||
continue
|
||||
}
|
||||
mountpointRootId = &searchmsg.ResourceID{
|
||||
StorageId: sid,
|
||||
|
||||
Reference in New Issue
Block a user