diff --git a/go.mod b/go.mod index 8aa78b5deb..a44c0b9966 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/graphql-go/graphql v0.8.0 github.com/iancoleman/strcase v0.2.0 github.com/ipfs/go-blockservice v0.5.0 - github.com/ipfs/go-cid v0.3.2 + github.com/ipfs/go-cid v0.4.0 github.com/ipfs/go-datastore v0.6.0 github.com/ipfs/go-ipfs-blockstore v1.3.0 github.com/ipfs/go-ipfs-ds-help v1.1.0 diff --git a/go.sum b/go.sum index 43a5d6a36d..1e0a6873c8 100644 --- a/go.sum +++ b/go.sum @@ -374,8 +374,8 @@ github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= -github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc= -github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= +github.com/ipfs/go-cid v0.4.0 h1:a4pdZq0sx6ZSxbCizebnKiMCx/xI/aBBFlB73IgH4rA= +github.com/ipfs/go-cid v0.4.0/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/ipfs/go-cidutil v0.1.0 h1:RW5hO7Vcf16dplUU60Hs0AKDkQAVPVplr7lk97CFL+Q= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= diff --git a/planner/select.go b/planner/select.go index d51c570e0e..649da2305f 100644 --- a/planner/select.go +++ b/planner/select.go @@ -18,7 +18,6 @@ import ( "github.com/sourcenetwork/defradb/core" "github.com/sourcenetwork/defradb/db/base" "github.com/sourcenetwork/defradb/db/fetcher" - "github.com/sourcenetwork/defradb/errors" "github.com/sourcenetwork/defradb/planner/mapper" ) @@ -224,10 +223,7 @@ func (n *selectNode) initSource() ([]aggregateNode, error) { if n.parsed.Cid.HasValue() { c, err := cid.Decode(n.parsed.Cid.Value()) if err != nil { - return nil, errors.Wrap( - "failed to propagate VersionFetcher span, invalid CID", - err, - ) + return nil, err } spans := fetcher.NewVersionedSpan( core.DataStoreKey{DocKey: n.parsed.DocKeys.Value()[0]}, diff --git a/tests/integration/query/simple/with_cid_dockey_test.go b/tests/integration/query/simple/with_cid_dockey_test.go index 44ba80ba4f..d92733fff7 100644 --- a/tests/integration/query/simple/with_cid_dockey_test.go +++ b/tests/integration/query/simple/with_cid_dockey_test.go @@ -35,7 +35,7 @@ func TestQuerySimpleWithInvalidCidAndInvalidDocKey(t *testing.T) { }`, }, }, - ExpectedError: "invalid CID", + ExpectedError: "invalid cid: selected encoding not supported", } executeTestCase(t, test) diff --git a/tests/integration/query/simple/with_cid_test.go b/tests/integration/query/simple/with_cid_test.go index c7342fd278..6b105a846e 100644 --- a/tests/integration/query/simple/with_cid_test.go +++ b/tests/integration/query/simple/with_cid_test.go @@ -32,7 +32,7 @@ func TestQuerySimpleWithInvalidCid(t *testing.T) { }`, }, }, - ExpectedError: "failed to propagate VersionFetcher span, invalid CID: selected encoding not supported", + ExpectedError: "invalid cid: selected encoding not supported", } executeTestCase(t, test)