-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Currently IsValid only checks the bulk response failures so if the request to the server is invalid. The response status will be incorrect :)
Valid NEST response built from a unsuccessful low level call on POST: /_reindex
# Audit trail of this API call:
- [1] BadResponse: Node: http://localhost:9200/ Took: 00:00:00.0780609
# OriginalException: System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Elasticsearch.Net.HttpConnection.<RequestAsync>d__7`1.MoveNext() in C:\code\elasticsearch-net\src\Elasticsearch.Net\Connection\HttpConnection.cs:line 179
# Request:
{"source":{"sort":[{"id":{"order":"asc"}}],"index":"employees-v1"},"dest":{"index":"employees-v2"},"conflicts":"proceed"}
# Response:
{"took":4,"timed_out":false,"total":1,"updated":0,"created":0,"deleted":0,"batches":1,"version_conflicts":0,"noops":0,"retries":{"bulk":0,"search":0},"throttled_millis":0,"requests_per_second":-1.0,"throttled_until_millis":0,"failures":[{"index":"employees-v2","type":"employee","id":"57f7ce8df8a10336a0cf935b","cause":{"type":"mapper_parsing_exception","reason":"failed to parse [id]","caused_by":{"type":"number_format_exception","reason":"For input string: \"57f7ce8df8a10336a0cf935b\""}},"status":400}]}
Metadata
Metadata
Assignees
Labels
No labels