mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-29 09:35:38 -05:00
send empty response for non-ms sql peekdef calls (#480)
This commit is contained in:
@@ -381,7 +381,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
||||
{
|
||||
if (definitionResult.IsErrorResult)
|
||||
{
|
||||
await requestContext.SendError(definitionResult.Message);
|
||||
await requestContext.SendError(definitionResult.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -391,12 +391,17 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
||||
}
|
||||
else
|
||||
{
|
||||
// Send an empty result so that processing does not hang
|
||||
// Send an empty result so that processing does not hang when peek def service called from non-mssql clients
|
||||
await requestContext.SendResult(Array.Empty<Location>());
|
||||
}
|
||||
|
||||
DocumentStatusHelper.SendTelemetryEvent(requestContext, CreatePeekTelemetryProps(succeeded, isConnected));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Send an empty result so that processing does not hang
|
||||
await requestContext.SendResult(Array.Empty<Location>());
|
||||
}
|
||||
|
||||
DocumentStatusHelper.SendStatusChange(requestContext, textDocumentPosition, DocumentStatusHelper.DefinitionRequestCompleted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user