From 813edc4a59d62db110313fb0e5b4fb3ad90edd51 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Tue, 23 Sep 2025 15:46:59 +0200 Subject: [PATCH] use standard errors package Signed-off-by: Christian Richter --- services/graph/pkg/service/v0/service.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/graph/pkg/service/v0/service.go b/services/graph/pkg/service/v0/service.go index b7358b03a2..2e36d9c56a 100644 --- a/services/graph/pkg/service/v0/service.go +++ b/services/graph/pkg/service/v0/service.go @@ -4,6 +4,7 @@ import ( "context" "crypto/tls" "crypto/x509" + "errors" "fmt" "net/http" "os" @@ -23,7 +24,6 @@ import ( "github.com/opencloud-eu/reva/v2/pkg/store" "github.com/opencloud-eu/reva/v2/pkg/utils" "github.com/opencloud-eu/reva/v2/pkg/utils/ldap" - "github.com/pkg/errors" ocldap "github.com/opencloud-eu/opencloud/pkg/ldap" "github.com/opencloud-eu/opencloud/pkg/log" @@ -171,14 +171,15 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx kv, err := js.KeyValue(options.Config.Store.Database) if err != nil { if !errors.Is(err, nats.ErrBucketNotFound) { - return Graph{}, errors.Wrapf(err, "Failed to get bucket (%s)", options.Config.Store.Database) + return Graph{}, fmt.Errorf("Failed to get bucket (%s): %w", options.Config.Store.Database, err) + } kv, err = js.CreateKeyValue(&nats.KeyValueConfig{ Bucket: options.Config.Store.Database, }) if err != nil { - return Graph{}, errors.Wrapf(err, "Failed to create bucket (%s)", options.Config.Store.Database) + return Graph{}, fmt.Errorf("Failed to create bucket (%s): %w", options.Config.Store.Database, err) } } if err != nil {