Skip to content

Commit 6004f8b

Browse files
committed
fix(socket): check response status on deployment notification
Log a warning when the socket server returns a non-2xx status for deployment notifications, matching the pattern in lifecycle.ts.
1 parent cb4f9fa commit 6004f8b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • apps/sim/lib/workflows/orchestration

apps/sim/lib/workflows/orchestration/deploy.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ const logger = createLogger('DeployOrchestration')
3838
export async function notifySocketDeploymentChanged(workflowId: string): Promise<void> {
3939
try {
4040
const socketServerUrl = env.SOCKET_SERVER_URL || 'http://localhost:3002'
41-
await fetch(`${socketServerUrl}/api/workflow-deployed`, {
41+
const response = await fetch(`${socketServerUrl}/api/workflow-deployed`, {
4242
method: 'POST',
4343
headers: {
4444
'Content-Type': 'application/json',
4545
'x-api-key': env.INTERNAL_API_SECRET,
4646
},
4747
body: JSON.stringify({ workflowId }),
4848
})
49+
if (!response.ok) {
50+
logger.warn(`Socket deployment notification failed (${response.status}) for workflow ${workflowId}`)
51+
}
4952
} catch (error) {
5053
logger.error('Error sending workflow deployed event to socket server', error)
5154
}

0 commit comments

Comments
 (0)