Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

PMM-9377 Add compatibility with grpc-gateway v2 #186

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions commands/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ type Error struct {
func GetError(err ErrorResponse) Error {
v := reflect.ValueOf(err)
p := v.Elem().FieldByName("Payload")
e := p.Elem().FieldByName("Error")
m := p.Elem().FieldByName("Message")
return Error{
Code: err.Code(),
Error: e.String(),
Error: m.String(),
}
}

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ require (
github.com/AlekSi/pointer v1.2.0
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d
github.com/go-openapi/runtime v0.19.20
github.com/percona/pmm v0.0.0-20211227150642-d5b782829da7
github.com/percona/pmm v0.0.0-20220321064814-692cfc95e2e9
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.1
golang.org/x/sys v0.0.0-20200722175500-76b94024e4b6
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
gopkg.in/alecthomas/kingpin.v2 v2.2.6
)

Expand All @@ -36,8 +36,8 @@ require (
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.7.1 // indirect
golang.org/x/net v0.0.0-20200707034311-ab3426394381 // indirect
golang.org/x/text v0.3.5 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)
Loading