Skip to content

Commit 3f8f68b

Browse files
committed
What is setting done to null
Signed-off-by: Emmanuel Hugonnet <[email protected]>
1 parent 73c4292 commit 3f8f68b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

server-common/src/main/java/io/a2a/server/events/EnhancedRunnable.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public void setError(Throwable error) {
1717

1818
public void addDoneCallback(DoneCallback doneCallback) {
1919
System.out.println("Adding done callback " + doneCallback);
20+
if(doneCallback == null) {
21+
new RuntimeException("*******************************************************").printStackTrace();
22+
}
2023
doneCallbacks.add(doneCallback);
2124
}
2225

server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ public EventKind onMessageSend(MessageSendParams params, ServerCallContext conte
292292
LOGGER.warn(msg, e);
293293
throw new InternalError(msg);
294294
} catch (java.util.concurrent.ExecutionException e) {
295-
String msg = String.format("Error during task %s execution %s", taskId, e.getMessage());
295+
String msg = String.format("Error during task %s execution %s", taskId, e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
296+
e.printStackTrace();
296297
LOGGER.warn(msg, e.getCause());
297298
throw new InternalError(msg);
298299
} catch (java.util.concurrent.TimeoutException e) {

0 commit comments

Comments
 (0)