From: Kai Moritz Date: Sat, 2 Sep 2023 17:22:08 +0000 (+0200) Subject: WIP X-Git-Tag: wip-inmemory-chat-home-service~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=e723d6502cc39eb13a734160aded9faa58ddb2cf;p=demos%2Fkafka%2Fchat WIP --- diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/inmemory/ShardedChatHome.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/inmemory/ShardedChatHome.java index ab3969f5..b8bc4b8e 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/inmemory/ShardedChatHome.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/inmemory/ShardedChatHome.java @@ -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