Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(dp): replace deprecated errors module #12727

Merged
merged 1 commit into from May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dp/cloud/go/go.mod
Expand Up @@ -31,7 +31,6 @@ require (
github.com/golang/protobuf v1.5.2
github.com/labstack/echo v3.3.10+incompatible
github.com/olivere/elastic/v7 v7.0.6
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
google.golang.org/grpc v1.43.0
google.golang.org/protobuf v1.28.0
Expand Down Expand Up @@ -76,6 +75,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.5.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions dp/cloud/go/services/dp/servicers/cbsd_manager.go
Expand Up @@ -16,9 +16,9 @@ package servicers
import (
"context"
"encoding/json"
"fmt"
"time"

"github.com/pkg/errors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

Expand Down Expand Up @@ -195,7 +195,7 @@ func cbsdFromDatabase(data *storage.DetailedCbsd, inactivityInterval time.Durati
}

func makeErr(err error, wrap string) error {
e := errors.Wrap(err, wrap)
e := fmt.Errorf(wrap+": %w", err)
code := codes.Internal
if err == merrors.ErrNotFound {
code = codes.NotFound
Expand Down