Make error typed

This commit is contained in:
mcrakhman 2023-06-13 15:22:46 +02:00
parent 2aaa8f4a0c
commit 5c884afcf1
No known key found for this signature in database
GPG Key ID: DED12CFEF5B8396B

View File

@ -3,7 +3,6 @@ package synctree
import (
"context"
"errors"
"fmt"
"time"
"github.com/anyproto/any-sync/commonspace/object/tree/objecttree"
@ -45,7 +44,7 @@ func (t treeRemoteGetter) getPeers(ctx context.Context) (peerIds []string, err e
return
}
if len(respPeers) == 0 {
err = fmt.Errorf("no responsible peers")
err = ErrNoResponsiblePeers
return
}
for _, p := range respPeers {