From 6b5d5eefd63fc029318dd2b0fb3da4e31f0b4151 Mon Sep 17 00:00:00 2001 From: Z User Date: Thu, 29 Oct 2026 12:08:19 +0000 Subject: [PATCH] fix: handle null response from Dokploy application.deploy --- src/lib/dokploy.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/dokploy.ts b/src/lib/dokploy.ts index ce9c5e5..8b99b93 100644 --- a/src/lib/dokploy.ts +++ b/src/lib/dokploy.ts @@ -214,10 +214,13 @@ export function createDokployClient(config: DokployConfig) { } async function deployApplication(applicationId: string): Promise<{ jobId?: string; status: string }> { - const res = await call<{ jobId?: string; deployId?: string; status?: string }>('/application.deploy', { + const res = await call | null>('/application.deploy', { applicationId, }) - return { jobId: res.jobId ?? res.deployId, status: res.status ?? 'deploying' } + if (!res) return { jobId: undefined, status: 'deploying' } + const jobId = (res.jobId as string) ?? (res.deployId as string) ?? (res.id as string) + const status = (res.status as string) ?? 'deploying' + return { jobId, status } } async function getApplication(applicationId: string): Promise {