# Unable to update elastic data

**URL:** <https://discuss.elastic.co/t/unable-to-update-elastic-data/365530>\
**Category:** Elasticsearch\
**Created:** [August 26, 2024, 6:52am UTC](https://discuss.elastic.co/t/unable-to-update-elastic-data/365530 "2024-08-26T06:52:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![irajeshr](https://avatars.discourse-cdn.com/v4/letter/i/53a042/32.png) [@irajeshr](https://discuss.elastic.co/u/irajeshr)\
**Post date:** [August 26, 2024, 6:52am UTC](https://discuss.elastic.co/t/unable-to-update-elastic-data/365530/1 "2024-08-26T06:52:17Z")

</div>

i am trying to update elastic data based on ID, but the error is failing with bad request/data missing error.

**Code:**

```auto
Dim testIndex1 = New testIndex With {
    .id = txtId.Text.Trim,
    .User = txtUserid.Text.Trim,
    .DateNdTime = Now,
    .Message = Now & ":- " & txtNewMsg.Text.Trim
}
Dim client = connect()
Dim response = client.UpdateAsync(Of testIndex, testIndex)(document:=testIndex1, index:=txtIndex3.Text.Trim)
If response.Result.IsValidResponse Then
    lblUpdResponse.Text = "Update succeeded."
End If

```

**Error:**

```auto
{Unsuccessful (400) low level call on POST: /index01/_update/I0NQACKBE7
 Exception: The remote server returned an error: (400) Bad Request. Call: Status code 400 from: POST /index01/_update/I0NQACKBE7. ServerError: Type: action_request_validation_exception Reason: "Validation Failed: 1: script or doc is missing;"
}

```
