示例#1
0
        private static void CheckResponse(ElasticsearchResponse <string> response)
        {
            if (response?.Body == null || string.IsNullOrEmpty(response.Body))
            {
                if (!string.IsNullOrEmpty(response?.DebugInformation))
                {
                    throw QueryException.MissingBody(Strings.MissingBody, new Exception(response.DebugInformation, response.OriginalException));
                }

                throw QueryException.MissingBody(Strings.MissingBody, response?.OriginalException);
            }
        }