# Http\_poller on failure add\_field not working

**URL:** <https://discuss.elastic.co/t/http-poller-on-failure-add-field-not-working/70287>\
**Category:** Logstash\
**Created:** [December 30, 2016, 5:00pm UTC](https://discuss.elastic.co/t/http-poller-on-failure-add-field-not-working/70287 "2016-12-30T17:00:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgspohn](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@cgspohn](https://discuss.elastic.co/u/cgspohn)\
**Post date:** [December 30, 2016, 5:00pm UTC](https://discuss.elastic.co/t/http-poller-on-failure-add-field-not-working/70287/1 "2016-12-30T17:00:19Z")

</div>

For the http\_poller input I have used the "add\_field" option which works perfect when the request succeeds. But when the request fails (falls into the handle\_failure method) the "add\_field" option is not honored. I wonder if this is because the **decorate(event)** done in handle\_decoded\_event is not present in the handle\_failure. From the code for the base event in Logstash, it looks to me like the decorate method is the one that adds the custom fields. Would it be possible to add the decorate to the handle\_failure for http\_poller?

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 27, 2017, 5:00pm UTC](https://discuss.elastic.co/t/http-poller-on-failure-add-field-not-working/70287/2 "2017-01-27T17:00:25Z")

</div>

Closed on January 27, 2017, 5:00pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
