Skip to content

Commit

Permalink
fix: display correct error message (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
erebe authored Nov 18, 2024
1 parent 4e7d757 commit d53a727
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/qovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand All @@ -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)
}
Expand All @@ -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)
}
Expand Down

0 comments on commit d53a727

Please sign in to comment.