Fix error not getting sent back when generating deploy plan (#1875)

This commit is contained in:
Kim Santiago
2023-02-21 16:53:21 -08:00
committed by GitHub
parent 2506a4df9c
commit dfc54f99cf

View File

@@ -187,16 +187,19 @@ namespace Microsoft.SqlTools.ServiceLayer.DacFx
out connInfo);
if (connInfo != null)
{
GenerateDeployPlanOperation operation = new GenerateDeployPlanOperation(parameters, connInfo);
operation.Execute(parameters.TaskExecutionMode);
await requestContext.SendResult(new GenerateDeployPlanRequestResult()
await BaseService.RunWithErrorHandling(async () =>
{
OperationId = operation.OperationId,
Success = true,
ErrorMessage = string.Empty,
Report = operation.DeployReport
});
GenerateDeployPlanOperation operation = new GenerateDeployPlanOperation(parameters, connInfo);
operation.Execute(parameters.TaskExecutionMode);
return new GenerateDeployPlanRequestResult()
{
OperationId = operation.OperationId,
Success = true,
ErrorMessage = string.Empty,
Report = operation.DeployReport
};
}, requestContext);
}
}