Problem
In packages/durabletask-js/src/worker/entity-executor.ts line 399, the entity executor's error handling uses:
failureDetails.setStacktrace(new StringValue().setValue(error.stack));
In google-protobuf, setValue() returns void (not the StringValue instance for fluent chaining). This means setStacktrace() receives undefined, silently discarding the stack trace for all entity operation failures.
Root Cause
The code assumes setValue() returns this for method chaining, but google-protobuf setters return void. This is a one-character-class-of-bug: the code compiles and runs without error, but the stack trace is never actually set on the failure details.
Proposed Fix
Construct the StringValue separately and pass it to setStacktrace(), matching the correct pattern used in pb-helper.util.ts (lines 200-202):
const stackValue = new StringValue();
stackValue.setValue(error.stack);
failureDetails.setStacktrace(stackValue);
Impact
Severity: Medium — Every entity operation failure loses its stack trace, making debugging entity errors significantly harder. Users see error type and message but cannot trace back to the exact line that threw. This affects all entity-based workflows using the V1 batch execution path.
Problem
In
packages/durabletask-js/src/worker/entity-executor.tsline 399, the entity executor's error handling uses:In google-protobuf,
setValue()returnsvoid(not the StringValue instance for fluent chaining). This meanssetStacktrace()receivesundefined, silently discarding the stack trace for all entity operation failures.Root Cause
The code assumes
setValue()returnsthisfor method chaining, but google-protobuf setters returnvoid. This is a one-character-class-of-bug: the code compiles and runs without error, but the stack trace is never actually set on the failure details.Proposed Fix
Construct the StringValue separately and pass it to
setStacktrace(), matching the correct pattern used inpb-helper.util.ts(lines 200-202):Impact
Severity: Medium — Every entity operation failure loses its stack trace, making debugging entity errors significantly harder. Users see error type and message but cannot trace back to the exact line that threw. This affects all entity-based workflows using the V1 batch execution path.