Open yevhen opened 3 years ago
Hi @yevhen. Apologies for my delay in responding. I read this and thought I had left a note. I can see the benefit of this, particularly for upgrade scenarios as you have indicated. I'll need to spend some more time reviewing the finer details.
In our code, we heavily rely on
ElasticClientException
being thrown for requests made to missing documents/indices. While upgrading to 7.x we figured out that we need substantial changes to be made in too many places. Moreover, the previous behavior was easy to use with higher-order functions - you just catchElasticClientException
in top-level code and you're done. With new behavior, we need to augment low-level code everywhere to check forResponseBase.IsValid
property at the point of invocation which makes it non-composable and leads to ugly and verbose code (ala Go err checking).Please, provide a global option for NEST high-level client, so that it doesn't override
StatusCodeToResponseSuccess
for 404 status codes.