Skip to content

Commit

Permalink
tests up
Browse files Browse the repository at this point in the history
  • Loading branch information
brig committed Dec 28, 2024
1 parent 78a5836 commit 2da58c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ public void callWithRetryTest() throws Exception {
"(concord.yaml) @ line: 3, col: 7, thread: 0, flow: inner");
assertSegmentStatusError(log, 1);

assertSystemSegment(log, "[WARN ] Last error: com.walmartlabs.concord.runtime.v2.sdk.UserDefinedException: FAIL. Waiting for 1000ms before retry (attempt #0)");
assertSystemSegment(log, "[WARN ] Last error: FAIL. Waiting for 1000ms before retry (attempt #0)");

assertSegmentLog(log, 2, "[INFO ] in inner flow");
assertSegmentStatusOk(log, 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public void serialize(Exception exception, JsonGenerator gen, SerializerProvider
gen.writeNumberField("@id", idGenerator.getAndIncrement());
gen.writeStringField("message", exception.getMessage());
if (exception instanceof UserDefinedException ue) {
gen.writeObjectField("payload", ue.getPayload());
if (ue.getPayload() != null && !ue.getPayload().isEmpty()) {
gen.writeObjectField("payload", ue.getPayload());
}
} else {
gen.writeStringField("type", exception.getClass().getName());
}
Expand Down

0 comments on commit 2da58c0

Please sign in to comment.