# newResponse returning failed shard responses

**URL:** https://discuss.elastic.co/t/newresponse-returning-failed-shard-responses/80520
**Category:** Elasticsearch
**Created:** [March 29, 2017, 4:05pm UTC](https://discuss.elastic.co/t/newresponse-returning-failed-shard-responses/80520 "2017-03-29T16:05:42Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![m6800](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@m6800](https://discuss.elastic.co/u/m6800)
#### Post date: [March 30, 2017, 3:34pm UTC](https://discuss.elastic.co/t/newresponse-returning-failed-shard-responses/80520/4 "2017-03-30T15:34:14Z")

</div>

It looks like StreamOutput.writeGenericValues does not support custom objects.

> [@Java Api for UpdateByQuery requests](https://discuss.elastic.co/t/java-api-for-updatebyquery-requests/60820/3):
>
> OK, that was a bit of magic sauce I wasn't aware of. It got me a little further. Now getting write exception when attempting to write my custom objects. How do I pass the structures I want to update down to the script? Even if it's serializable, the script won't have access to the class itself. In the Sense playground, I can just create the JSON and magic happens. I tried turning it into JSON first, but then groovy script complains about strings not having the fields I'm looking for. What's the …

---

_[View the full topic](https://discuss.elastic.co/t/newresponse-returning-failed-shard-responses/80520)._
