Skip to content

Commit

Permalink
fix: return grpc invalidargument on invalid group id
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Normore committed Jan 19, 2024
1 parent 51798be commit 47b6ffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/mls/api/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (s *Service) SendGroupMessages(ctx context.Context, req *mlsv1.SendGroupMes
// TODO: Wrap this in a transaction so publishing is all or nothing
decodedGroupId, err := hex.DecodeString(result.GroupId)
if err != nil {
return nil, err
return nil, status.Error(codes.InvalidArgument, "invalid group id")
}
msg, err := s.store.InsertGroupMessage(ctx, decodedGroupId, input.GetV1().Data)
if err != nil {
Expand Down

0 comments on commit 47b6ffe

Please sign in to comment.