We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent faec3cd commit b65790bCopy full SHA for b65790b
1 file changed
extensions/ql-vscode/src/mocks/recorder.ts
@@ -88,13 +88,18 @@ export class Recorder extends DisposableObject {
88
89
const bodyFileName = `${i}-${writtenRequest.request.kind}.body.${extension}`;
90
const bodyFilePath = join(scenarioDirectory, bodyFileName);
91
- await writeFile(bodyFilePath, writtenRequest.response.body);
+
92
+ let bodyFileLink = undefined;
93
+ if (writtenRequest.response.body) {
94
+ await writeFile(bodyFilePath, writtenRequest.response.body || "");
95
+ bodyFileLink = `file:${bodyFileName}`;
96
+ }
97
98
writtenRequest = {
99
...writtenRequest,
100
response: {
101
...writtenRequest.response,
- body: `file:${bodyFileName}`,
102
+ body: bodyFileLink,
103
},
104
};
105
}
0 commit comments