# Invalid NEST response built from a unsuccessful () low level call on POST using .NET Nest

**URL:** <https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-post-using-net-nest/284583>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [September 19, 2021, 10:18pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-post-using-net-nest/284583 "2021-09-19T22:18:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bensalerno](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@bensalerno](https://discuss.elastic.co/u/bensalerno)\
**Post date:** [September 19, 2021, 10:18pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-post-using-net-nest/284583/1 "2021-09-19T22:18:59Z")

</div>

New to ElasticSearch. I've seen a couple posts with similar titles but didn't seem to apply to me. I'm having trouble querying my ES cluster for the first time. Someone else creaed the cluster and gave me login info.

My code looks like this:

```auto
var settings = new ConnectionSettings(new Uri("server"))
            .BasicAuthentication("user", "pw")
            .DefaultIndex("index");

var client = new ElasticClient(settings); 

var searchResponse = client.Search<mdl.Event>(s => s
                    .Query(q => q
                        .QueryString(qs => qs
                            .Query("Hello"))
                        && q
                        .DateRange(r => r
                            .Field(f => f.CreatedTimeStamp)
                            .GreaterThanOrEquals(search.From)
                            .LessThanOrEquals(search.To))));
                Console.Write(searchResponse);

```

I am getting no errors with this code. Only when I have the Console.Write statement I included do I get any detail. It reads:

```auto
Invalid NEST response built from a unsuccessful () low level call on POST: /index/_search?typed_keys=true

```

I'm not sure what is going wrong here. Is there an issue with the index or a quick fix to this issue?

---

<div class="post-metadata">

**Author:** ![stevejgordon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevejgordon/32/80912_2.png) [@stevejgordon](https://discuss.elastic.co/u/stevejgordon)\
**Post date:** [September 21, 2021, 12:12pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-post-using-net-nest/284583/2 "2021-09-21T12:12:47Z")

</div>

Hi @bensalerno,

It's hard to say what caused this but the `SearchResponse` object includes some properties you can inspect during debugging and/or log which will help identify the cause.

The most useful to start with are:

```auto
if (!searchResponse.IsValid)
{
	// Handle errors
	var debugInfo = searchResponse.DebugInformation;
	var error = searchResponse.ServerError.Error;
}

```

- `IsValid` will be false if the request failed for some reason.
- `DebugInformation`is a string and includes the audit trail for the request. You can enable extra details in the configuration by enabling [Debug Mode](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/debug-mode.html).
- The `ServerError` property returns an object you can inspect to find various details from the server which may explain why a search failed.

I hope that answers your question and helps you debug a bit further.

Steve

---

<div class="post-metadata">

**Author:** ![bensalerno](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@bensalerno](https://discuss.elastic.co/u/bensalerno)\
**Post date:** [September 21, 2021, 5:16pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-post-using-net-nest/284583/3 "2021-09-21T17:16:47Z")

</div>

I've returned the debug information - it reads like this:

The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product. Call: Status code unknown from: GET / ---\> Elasticsearch.Net.PipelineException: The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product. ---\> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---\> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---\> Interop+AppleCrypto+SslException: misc. bad certificate

I imagine this has something to do with settings my certificates. I posted another question similar to this - [Using certificates with ElasticSearch Nest client? - #2 by stevejgordon](https://discuss.elastic.co/t/using-certificates-with-elasticsearch-nest-client/284656/2) - but I'm still not entirely sure how to use all of my certificates

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 19, 2021, 5:17pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-post-using-net-nest/284583/4 "2021-10-19T17:17:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
