-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
NEST/Elasticsearch.Net version: 2.4.1
Elasticsearch version: 2.3.3
Description of the problem including expected versus actual behavior:
UpdateByQuery
with a bad script results in a valid, successful NEST response.
IsValid
property: Expected:false
, Actual:true
ServerError
property: Expected: Object containing type of exception, root cause and caused by information. Actual:null
Failures
property is alsonull
, but since the entire request failed, I suppose this is OK.
Steps to reproduce:
Invoke an UpdateByQuery
request with an inline groovy script that fails to compile.
Original response from ES:
{
"error":{
"root_cause":[
{
"type":"script_exception",
"reason":"failed to compile groovy script"
}
],
"type":"script_exception",
"reason":"Failed to compile inline script [ctx._source...] using lang [groovy]",
"caused_by":{
"type":"script_exception",
"reason":"failed to compile groovy script",
"caused_by":{
"type":"multiple_compilation_errors_exception",
"reason":"startup failed: xxx: 1: expecting EOF, found ')' @ line 1, column 113. 1 error"
}
}
},
"status":500
}
Provide DebugInformation
(if relevant):
Valid NEST response built from a successful low level call on POST: /xxx/yyy/_update_by_query?size=1000
# Audit trail of this API call:
- HealthyResponse: Node: http://somenode:9200/ Took: 00:00:00.0275072
# OriginalException: System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at Elasticsearch.Net.HttpConnection.Request[TReturn](RequestData requestData)
Sorry for being too busy to dig around and provide a PR for this.. keep up the wonderful work guys 😍
Metadata
Metadata
Assignees
Labels
No labels