Checking response code from ElasticSearch

If ElasticSearch returns with a non-200 status code fire an error event