Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr ## [Unreleased] ### Changed - Default runtime HTTP key value is no longer the same as the default Server key value. - Group create now returns HTTP 409 Conflict/GRPC Code 6 when group name is already in use. ## [2.7.0] - 2019-09-11 ### Added Loading server/api_group.go +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ func (s *ApiServer) CreateGroup(ctx context.Context, in *api.CreateGroupRequest) group, err := CreateGroup(ctx, s.logger, s.db, userID, userID, in.GetName(), in.GetLangTag(), in.GetDescription(), in.GetAvatarUrl(), "", in.GetOpen(), maxCount) if err != nil { if err == ErrGroupNameInUse { return nil, status.Error(codes.InvalidArgument, "Group name is in use.") return nil, status.Error(codes.AlreadyExists, "Group name is in use.") } return nil, status.Error(codes.Internal, "Error while trying to create group.") } Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr ## [Unreleased] ### Changed - Default runtime HTTP key value is no longer the same as the default Server key value. - Group create now returns HTTP 409 Conflict/GRPC Code 6 when group name is already in use. ## [2.7.0] - 2019-09-11 ### Added Loading
server/api_group.go +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ func (s *ApiServer) CreateGroup(ctx context.Context, in *api.CreateGroupRequest) group, err := CreateGroup(ctx, s.logger, s.db, userID, userID, in.GetName(), in.GetLangTag(), in.GetDescription(), in.GetAvatarUrl(), "", in.GetOpen(), maxCount) if err != nil { if err == ErrGroupNameInUse { return nil, status.Error(codes.InvalidArgument, "Group name is in use.") return nil, status.Error(codes.AlreadyExists, "Group name is in use.") } return nil, status.Error(codes.Internal, "Error while trying to create group.") } Loading