diff --git a/src/Stratis.VS.StratisEVM/SolidityLanguageClient.cs b/src/Stratis.VS.StratisEVM/SolidityLanguageClient.cs index 973475d..621c485 100644 --- a/src/Stratis.VS.StratisEVM/SolidityLanguageClient.cs +++ b/src/Stratis.VS.StratisEVM/SolidityLanguageClient.cs @@ -260,7 +260,7 @@ public async Task HandleNotificationAsync(string methodName, JToken methodParam, public async Task HandleRequestAsync(string methodName, JToken methodParam, Func> sendRequest) { - try + try //Handle exceptions raised by vscode-solidity server like https://github.com/juanfranblanco/vscode-solidity/issues/446 { var resp = await sendRequest(methodParam); Info("Request {req} {param}: {resp}", methodName, methodParam?.ToString() ?? "", resp?.ToString() ?? "(null)"); @@ -303,13 +303,13 @@ public async Task HandleRequestAsync(string methodName, JToken methodPar else { Info("resp is null"); - return JObject.FromObject(new { contents = new { kind = "plaintext", value = "" } }); + return resp; } } catch (Exception ex) { Error(ex, "Exception thrown handling request {m}.", methodName); - return JObject.FromObject(new { contents = new { kind = "plaintext", value = "" } }); + return null; } } }