Update exception for empty non-sync messages to MessageSender

This commit is contained in:
Chris Eager authored and Chris Eager committed 2026-04-15 17:03:10 -05:00
1 parent b702d9d5a9
commit aabbbe486f
2 files changed
+5 -2

No files matched your search

@@ -304,8 +304,11 @@ public class MessageSender {
}
if (messagesByDeviceId.isEmpty()) {
if (syncMessageSenderDeviceId.isEmpty()) {
throw new IllegalArgumentException("Messages must not be empty for non-sync messages");
}
Metrics.counter(EMPTY_MESSAGE_LIST_COUNTER_NAME,
Tags.of(SYNC_MESSAGE_TAG_NAME, String.valueOf(syncMessageSenderDeviceId.isPresent())).and(platformTag)).increment();
Tags.of(SYNC_MESSAGE_TAG_NAME, String.valueOf(true)).and(platformTag)).increment();
}
final byte excludedDeviceId;