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 ( import (
"context" "context"
"errors" "errors"
"fmt"
"time" "time"
"github.com/anyproto/any-sync/commonspace/object/tree/objecttree" "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 return
} }
if len(respPeers) == 0 { if len(respPeers) == 0 {
err = fmt.Errorf("no responsible peers") err = ErrNoResponsiblePeers
return return
} }
for _, p := range respPeers { for _, p := range respPeers {