-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
NEST/Elasticsearch.Net version:
6.3.1
Elasticsearch version:
6.5.0
Description of the problem including expected versus actual behavior:
Apparently it was decided to not always throw in case IsValid is false (see #2153, #2385).
My issue is not to reconsider this (although it would be nice to have this functionality somehow) but rather to clarify the documentation of ThrowExceptions which states:
...always throw an exception on the client when a call resulted in an exception on either the client or the Elasticsearch server.
Because I assumed I do not have to check a response for IsValid to be false I actually introduced a bug in my code. Maybe the xmldocs can be updated to state that always is not always always? 😉
Steps to reproduce:
- Create new
ElasticClientinstance usingConnectionSettings.ThrowExceptions() - Call a method like
UpdateByQuerywhich causes an error (like a document object not passing the strict mapping validation) - No exception is thrown
Metadata
Metadata
Assignees
Labels
No labels