diff --git a/worker/src/lib/managers/AsyncLogManager.ts b/worker/src/lib/managers/AsyncLogManager.ts index 105acf9ef..e23facf42 100644 --- a/worker/src/lib/managers/AsyncLogManager.ts +++ b/worker/src/lib/managers/AsyncLogManager.ts @@ -55,7 +55,7 @@ export async function logAsync( let templateWithInputs: TemplateWithInputs | undefined; try { - if (requestWrapper.heliconeHeaders.promptHeaders.promptId) { + if (heliconeHeaders?.promptHeaders?.promptId) { const parseResult = parseJSXObject(asyncLogModel.providerRequest.json); templateWithInputs = parseResult?.templateWithInputs; }