Commit 913cc5b 1 parent 41ef3cf commit 913cc5b Copy full SHA for 913cc5b
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 52
52
};
53
53
54
54
const decodeUserMetadata = async (workflow : WorkflowExecution ) => {
55
+ const userMetadata = { summary: ' ' , details: ' ' };
55
56
try {
56
57
if (workflow ?.summary ) {
57
58
const decodedSummary = await decodeSingleReadablePayloadWithCodec (
58
59
workflow .summary ,
59
60
);
60
61
if (typeof decodedSummary === ' string' ) {
61
- $workflowRun . userMetadata .summary = decodedSummary ;
62
+ userMetadata .summary = decodedSummary ;
62
63
}
63
64
}
64
65
if (workflow ?.details ) {
65
66
const decodedDetails = await decodeSingleReadablePayloadWithCodec (
66
67
workflow .details ,
67
68
);
68
69
if (typeof decodedDetails === ' string' ) {
69
- $workflowRun . userMetadata .details = decodedDetails ;
70
+ userMetadata .details = decodedDetails ;
70
71
}
71
72
}
73
+
74
+ $workflowRun = { ... $workflowRun , userMetadata };
72
75
} catch (e ) {
73
76
console .error (' Error decoding user metadata' , e );
74
77
}
You can’t perform that action at this time.
0 commit comments