File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/server/api/src/app/flows/step-test-output Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ export const flowStepTestOutputService = {
20
20
flowVersionId,
21
21
output,
22
22
} : SaveParams ) : Promise < FlowStepTestOutput > {
23
- const compressedOutput = await encryptAndCompress ( output ) ;
23
+ let compressedOutput = Buffer . alloc ( 0 ) ;
24
+ if ( output !== undefined ) {
25
+ compressedOutput = await encryptAndCompress ( output ) ;
26
+ }
24
27
25
28
const existing = await flowStepTestOutputRepo ( ) . findOneBy ( {
26
29
stepId,
@@ -85,7 +88,14 @@ export const flowStepTestOutputService = {
85
88
async function decompressOutput (
86
89
record : FlowStepTestOutput ,
87
90
) : Promise < FlowStepTestOutput > {
88
- const decryptedOutput = await decompressAndDecrypt ( record . output as Buffer ) ;
91
+ const outputBuffer = record . output as Buffer ;
92
+ if ( outputBuffer . length === 0 ) {
93
+ return {
94
+ ...record ,
95
+ output : undefined ,
96
+ } ;
97
+ }
98
+ const decryptedOutput = await decompressAndDecrypt ( outputBuffer ) ;
89
99
90
100
return {
91
101
...record ,
You can’t perform that action at this time.
0 commit comments