Parse Elasticsearch exception responses and transform them into JavaScript Errors