Add error handling of dispatcher

This commit is contained in:
Zoltán Papp
2025-09-30 14:13:55 +02:00
parent 91278c2bea
commit a35215f720

View File

@@ -149,6 +149,9 @@ func (s *Server) SendWithDeliveryCheck(ctx context.Context, msg *proto.Encrypted
}
if _, err := s.dispatcher.SendMessage(ctx, msg, true); err != nil {
if errors.Is(err, dispatcher.ErrPeerNotConnected) {
return nil, status.Errorf(codes.NotFound, "remote peer not connected")
}
return nil, err
}