UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

17 lines (14 loc) 377 B
import _ from 'lodash'; /** * Utilize the extended error information returned from elasticsearch * @param {Error|String} err * @returns {string} */ export default function formatESMsg(err) { let rootCause = _.get(err, 'resp.error.root_cause'); if (!rootCause) { return; //undefined } let result = _.pluck(rootCause, 'reason').join('\n'); return result; };