WIP
authorKai Moritz <kai@juplo.de>
Sat, 2 Sep 2023 17:22:08 +0000 (19:22 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 2 Sep 2023 17:22:08 +0000 (19:22 +0200)
src/main/java/de/juplo/kafka/chat/backend/persistence/inmemory/ShardedChatHome.java

index ab3969f..b8bc4b8 100644 (file)
@@ -50,8 +50,11 @@ public class ShardedChatHome implements ChatHome
         : chatHomes[shard]
             .getChatRoom(id)
             .onErrorMap(throwable -> throwable instanceof UnknownChatroomException
-            ? Mono.error(new UnknownChatroomException(id, shard, ownedShards))
-            : Mono.error(throwable));
+            ? new UnknownChatroomException(
+                id,
+                shard,
+                ownedShards.stream().mapToInt(i -> i.intValue()).toArray())
+            : throwable);
   }
 
   @Override