Skip to content

Commit dfc54f9

Browse files
authored
Fix error not getting sent back when generating deploy plan (#1875)
1 parent 2506a4d commit dfc54f9

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/Microsoft.SqlTools.ServiceLayer/DacFx/DacFxService.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,19 @@ public async Task HandleGenerateDeployPlanRequest(GenerateDeployPlanParams param
187187
out connInfo);
188188
if (connInfo != null)
189189
{
190-
GenerateDeployPlanOperation operation = new GenerateDeployPlanOperation(parameters, connInfo);
191-
operation.Execute(parameters.TaskExecutionMode);
192-
193-
await requestContext.SendResult(new GenerateDeployPlanRequestResult()
190+
await BaseService.RunWithErrorHandling(async () =>
194191
{
195-
OperationId = operation.OperationId,
196-
Success = true,
197-
ErrorMessage = string.Empty,
198-
Report = operation.DeployReport
199-
});
192+
GenerateDeployPlanOperation operation = new GenerateDeployPlanOperation(parameters, connInfo);
193+
operation.Execute(parameters.TaskExecutionMode);
194+
195+
return new GenerateDeployPlanRequestResult()
196+
{
197+
OperationId = operation.OperationId,
198+
Success = true,
199+
ErrorMessage = string.Empty,
200+
Report = operation.DeployReport
201+
};
202+
}, requestContext);
200203
}
201204
}
202205

0 commit comments

Comments
 (0)