add organization_id to the Failed to create workflow error log part 2 (#909)

This commit is contained in:
Shuchang Zheng 2024-10-07 10:22:23 -07:00 committed by GitHub
parent caef189cda
commit 07fb1a16ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1047,7 +1047,10 @@ class WorkflowService:
return workflow
except Exception as e:
if new_workflow_id:
LOG.error(f"Failed to create workflow from request, deleting workflow {new_workflow_id}")
LOG.error(
f"Failed to create workflow from request, deleting workflow {new_workflow_id}",
organization_id=organization_id,
)
await self.delete_workflow_by_id(workflow_id=new_workflow_id, organization_id=organization_id)
else:
LOG.exception(f"Failed to create workflow from request, title: {request.title}")