throw JException on elasticsearch error