Improve error message handling (#497)

- Add special handling for token expired errors so they send with a clear flag that'll allow clients to take action on this case
- Send error message instead of callstack for all messages, and ensure all resource manager paths send back inner exceptions so users can understand the true root cause.
This commit is contained in:
Kevin Cunnane
2017-10-13 17:48:25 -07:00
committed by GitHub
parent b416951414
commit 0c7f559315
17 changed files with 381 additions and 275 deletions

View File

@@ -14,10 +14,10 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Completion
public class AutoCompletionResultTest
{
[Fact]
public void MetricsShouldGetSortedGivenUnSortedArray()
public void CompletionShouldRecordDuration()
{
AutoCompletionResult result = new AutoCompletionResult();
int duration = 2000;
int duration = 200;
Thread.Sleep(duration);
result.CompleteResult(new CompletionItem[] { });
Assert.True(result.Duration >= duration);