From 7883be1cb21158ab899e28edf5c30a9f4895d9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3rebe=20-=20Romain=20GERARD?= Date: Mon, 18 Nov 2024 17:03:40 +0100 Subject: [PATCH] fix: display correct error message --- utils/qovery.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/qovery.go b/utils/qovery.go index cb6190a2..fda23d13 100644 --- a/utils/qovery.go +++ b/utils/qovery.go @@ -2104,7 +2104,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser case DatabaseType: for _, database := range statuses.GetDatabases() { if database.Id == serviceId && IsTerminalState(database.State) { - _, _, err := client.DatabaseActionsAPI.DeployDatabase(context.Background(), serviceId).Execute() + _, resp, err := client.DatabaseActionsAPI.DeployDatabase(context.Background(), serviceId).Execute() if err != nil { return "", toHttpResponseError(resp) } @@ -2120,7 +2120,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser for _, container := range statuses.GetContainers() { if container.Id == serviceId && IsTerminalState(container.State) { req := request.(qovery.ContainerDeployRequest) - _, _, err := client.ContainerActionsAPI.DeployContainer(context.Background(), serviceId).ContainerDeployRequest(req).Execute() + _, resp, err := client.ContainerActionsAPI.DeployContainer(context.Background(), serviceId).ContainerDeployRequest(req).Execute() if err != nil { return "", toHttpResponseError(resp) } @@ -2136,7 +2136,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser for _, job := range statuses.GetJobs() { if job.Id == serviceId && IsTerminalState(job.State) { req := request.(qovery.JobDeployRequest) - _, _, err := client.JobActionsAPI.DeployJob(context.Background(), serviceId).JobDeployRequest(req).Execute() + _, resp, err := client.JobActionsAPI.DeployJob(context.Background(), serviceId).JobDeployRequest(req).Execute() if err != nil { return "", toHttpResponseError(resp) } @@ -2152,7 +2152,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser for _, helm := range statuses.GetHelms() { if helm.Id == serviceId && IsTerminalState(helm.State) { req := request.(qovery.HelmDeployRequest) - _, _, err := client.HelmActionsAPI.DeployHelm(context.Background(), serviceId).HelmDeployRequest(req).Execute() + _, resp, err := client.HelmActionsAPI.DeployHelm(context.Background(), serviceId).HelmDeployRequest(req).Execute() if err != nil { return "", toHttpResponseError(resp) }