diff --git a/internal/core/services/instance.go b/internal/core/services/instance.go index 298a7b28..b1e10180 100644 --- a/internal/core/services/instance.go +++ b/internal/core/services/instance.go @@ -1219,8 +1219,8 @@ func (s *InstanceService) removeInstanceContainer(ctx context.Context, inst *dom } if err := s.compute.DeleteInstance(ctx, containerID); err != nil { - s.logger.Warn("failed to remove docker container", "container_id", containerID, "error", err) - return errors.Wrap(errors.Internal, "failed to remove container", err) + s.logger.Warn("failed to remove instance", "backend", s.compute.Type(), "id", containerID, "error", err) + return errors.Wrap(errors.Internal, fmt.Sprintf("failed to remove %s instance", s.compute.Type()), err) } s.logger.Info("instance terminated", "instance_id", inst.ID) diff --git a/internal/core/services/instance_unit_test.go b/internal/core/services/instance_unit_test.go index 4f4dc96d..966b1a4f 100644 --- a/internal/core/services/instance_unit_test.go +++ b/internal/core/services/instance_unit_test.go @@ -823,7 +823,7 @@ func testInstanceServiceTerminateUnit(t *testing.T) { err := svc.TerminateInstance(ctx, instanceID.String()) require.Error(t, err) - assert.Contains(t, err.Error(), "failed to remove container") + assert.Contains(t, err.Error(), "failed to remove docker instance") mock.AssertExpectationsForObjects(t, repo, rbacSvc, compute) })