1 parent 059d244 commit 3a931fbCopy full SHA for 3a931fb
1 file changed
src/main/java/io/github/easy4j/hermes/api/sse/SseConsumerException.java
@@ -0,0 +1,17 @@
1
+package io.github.easy4j.hermes.api.sse;
2
+
3
+/** Signals a business SSE consumer failure without misclassifying it as JSON decoding. */
4
+public final class SseConsumerException extends RuntimeException {
5
+ private final String eventId;
6
+ private final String eventName;
7
8
+ public SseConsumerException(SseFrame frame, Throwable cause) {
9
+ super("Hermes SSE consumer failed for event "
10
+ + (frame.getEvent() == null ? "<unnamed>" : frame.getEvent()), cause);
11
+ this.eventId = frame.getId();
12
+ this.eventName = frame.getEvent();
13
+ }
14
15
+ public String getEventId() { return eventId; }
16
+ public String getEventName() { return eventName; }
17
+}
0 commit comments