From a000a29d81d7e6557edfbe3cb5f2ce17b203c634 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:49:52 +0900 Subject: [PATCH] Bump google.golang.org/grpc from 1.54.0 to 1.56.3 (#654) * Bump google.golang.org/grpc from 1.54.0 to 1.56.3 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.54.0 to 1.56.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.54.0...v1.56.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Map status code of ErrUserAlreadyExists to AlreadyExists --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Youngteac Hong --- go.mod | 2 +- go.sum | 4 ++-- server/rpc/grpchelper/status.go | 1 + server/rpc/server_test.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 59b2a6488..ac45b4f44 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( golang.org/x/crypto v0.14.0 golang.org/x/net v0.17.0 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.54.0 + google.golang.org/grpc v1.56.3 google.golang.org/protobuf v1.30.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index c43110251..260300617 100644 --- a/go.sum +++ b/go.sum @@ -657,8 +657,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/server/rpc/grpchelper/status.go b/server/rpc/grpchelper/status.go index a75a8a1b3..723f2a49d 100644 --- a/server/rpc/grpchelper/status.go +++ b/server/rpc/grpchelper/status.go @@ -59,6 +59,7 @@ var errorToCode = map[error]codes.Code{ // AlreadyExists means the requested resource already exists. database.ErrProjectAlreadyExists: codes.AlreadyExists, database.ErrProjectNameAlreadyExists: codes.AlreadyExists, + database.ErrUserAlreadyExists: codes.AlreadyExists, // FailedPrecondition means the request is rejected because the state of the // system is not the desired state. diff --git a/server/rpc/server_test.go b/server/rpc/server_test.go index faad247e8..b52e60f5f 100644 --- a/server/rpc/server_test.go +++ b/server/rpc/server_test.go @@ -718,7 +718,7 @@ func TestAdminRPCServerBackend(t *testing.T) { Password: adminPassword, }, ) - assert.Equal(t, codes.Unknown, status.Convert(err).Code()) + assert.Equal(t, codes.AlreadyExists, status.Convert(err).Code()) }) t.Run("admin login test", func(t *testing.T) {