Skip to content

Commit d2e7aa1

Browse files
committed
Review fixes
1 parent 64863bc commit d2e7aa1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎server-common/src/main/java/io/a2a/server/tasks/BasePushNotificationSender.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void sendNotification(StreamingEventKind event) {
118118
} else if (event instanceof TaskArtifactUpdateEvent artifactUpdate) {
119119
return artifactUpdate.taskId();
120120
}
121-
return null;
121+
throw new IllegalStateException("Unknown StreamingEventKind: " + event);
122122
}
123123

124124
private CompletableFuture<Boolean> dispatch(StreamingEventKind event, PushNotificationConfig pushInfo) {
@@ -140,7 +140,7 @@ private boolean dispatchNotification(StreamingEventKind event, PushNotificationC
140140
// (task/message/statusUpdate/artifactUpdate) per A2A spec section 4.3.3
141141
body = JsonUtil.toJson(event);
142142
} catch (Throwable throwable) {
143-
LOGGER.debug("Error serializing StreamingEventKind to JSON: {}", throwable.getMessage(), throwable);
143+
LOGGER.error("Error serializing StreamingEventKind to JSON: {}", throwable.getMessage(), throwable);
144144
return false;
145145
}
146146

0 commit comments

Comments
 (0)