@@ -46,14 +46,46 @@ internal static async Task<string> ExecuteAsync(
4646 object typedInput = DeserializeInput ( executorInput , inputType ) ;
4747
4848 DurableWorkflowContext workflowContext = new ( sharedState , executor ) ;
49- object ? result = await executor . ExecuteCoreAsync (
50- typedInput ,
51- new TypeId ( inputType ) ,
52- workflowContext ,
53- WorkflowTelemetryContext . Disabled ,
54- cancellationToken ) . ConfigureAwait ( false ) ;
55-
56- return SerializeActivityOutput ( result , workflowContext ) ;
49+
50+ object ? result ;
51+ try
52+ {
53+ result = await executor . ExecuteCoreAsync (
54+ typedInput ,
55+ new TypeId ( inputType ) ,
56+ workflowContext ,
57+ WorkflowTelemetryContext . Disabled ,
58+ cancellationToken ) . ConfigureAwait ( false ) ;
59+ }
60+ catch ( Exception ex )
61+ {
62+ // Diagnostic logging to surface inner exception details in CI
63+ Console . Error . WriteLine ( $ "[DIAG] DurableActivityExecutor: ExecuteCoreAsync failed for '{ binding . Id } ' (inputType={ inputType . FullName } )") ;
64+ Console . Error . WriteLine ( $ "[DIAG] Exception: { ex . GetType ( ) . FullName } : { ex . Message } ") ;
65+ for ( Exception ? inner = ex . InnerException ; inner is not null ; inner = inner . InnerException )
66+ {
67+ Console . Error . WriteLine ( $ "[DIAG] Inner: { inner . GetType ( ) . FullName } : { inner . Message } ") ;
68+ Console . Error . WriteLine ( $ "[DIAG] StackTrace: { inner . StackTrace } ") ;
69+ }
70+
71+ throw ;
72+ }
73+
74+ string serialized ;
75+ try
76+ {
77+ serialized = SerializeActivityOutput ( result , workflowContext ) ;
78+ }
79+ catch ( Exception ex )
80+ {
81+ Console . Error . WriteLine ( $ "[DIAG] DurableActivityExecutor: SerializeActivityOutput failed for '{ binding . Id } '") ;
82+ Console . Error . WriteLine ( $ "[DIAG] Result type: { result ? . GetType ( ) . FullName ?? "null" } ") ;
83+ Console . Error . WriteLine ( $ "[DIAG] Exception: { ex . GetType ( ) . FullName } : { ex . Message } ") ;
84+ Console . Error . WriteLine ( $ "[DIAG] StackTrace: { ex . StackTrace } ") ;
85+ throw ;
86+ }
87+
88+ return serialized ;
5789 }
5890
5991 private static string SerializeActivityOutput ( object ? result , DurableWorkflowContext context )
0 commit comments