From e723d6502cc39eb13a734160aded9faa58ddb2cf Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 2 Sep 2023 19:22:08 +0200 Subject: [PATCH] WIP --- .../chat/backend/persistence/inmemory/ShardedChatHome.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.20.1