Hi,
I have created a entity definition with a date time field. And if I'm entering any other value than date time type, then that record is not getting added into elastic and it is throwing an error. But I'm getting success Index response, with httpstatus code 200. But in Debug Info it is showing as errors:true
. I want to throw an error whenever I'm getting a response like this from Elastic side. How can I do it.
Please find my debug Info here.
{ "took": 5, "errors": true, "items": [ { "index": { "_index": "RandomKey", "_type": "RandomKey", "_id": "RandomID", "status": 400, "error": { "type": "mapper_parsing_exception", "reason": "failed to parse [dtDateTime]", "caused_by": { "type": "illegal_argument_exception", "reason": "Invalid format: \"SOme Text for check\"" } } } } ] }
Column dtDateTime is a datetime column and I'm sending some text in this. I have added ThrowExceptions = true . but it is not throwing any Exception.