private async Task EnsureDiagnostics()
        {
            if (_diagCache == null)
            {
                var resp = await _searchClient.GetDiagnostics();

                if (!resp.IsSuccessStatusCode)
                {
                    Trace.Error("HTTP Error when retrieving diagnostics: " + ((int)resp.StatusCode).ToString());
                    _diagCache = new JObject();
                }
                else
                {
                    _diagCache = await resp.ReadContent();
                }
            }
        }