FIX:KAfkaChatHomeTEst
authorKai Moritz <kai@juplo.de>
Tue, 29 Aug 2023 17:02:28 +0000 (19:02 +0200)
committerKai Moritz <kai@juplo.de>
Tue, 29 Aug 2023 17:36:39 +0000 (19:36 +0200)
src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java

index 7659d1e..10d26ba 100644 (file)
@@ -372,12 +372,12 @@ public class ChatRoomChannel implements Runnable, ConsumerRebalanceListener
   {
     if (loadInProgress)
     {
-      throw new LoadInProgressException(shard);
+      return Mono.error(new LoadInProgressException(shard));
     }
 
     if (!isShardOwned[shard])
     {
-      throw new ShardNotOwnedException(shard);
+      return Mono.error(new ShardNotOwnedException(shard));
     }
 
     return Mono.justOrEmpty(chatrooms[shard].get(id));