Merge pull request #3856 from Gueust/elasticsearc_fix_error

Serialize an elasticsearch error previously printed as 'Object'
This commit is contained in:
Carl Bergquist 2016-01-27 15:08:00 +01:00
commit 0ea651f1df

View File

@ -146,7 +146,7 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
return { status: "success", message: "Data source is working", title: "Success" };
}, function(err) {
if (err.data && err.data.error) {
return { status: "error", message: err.data.error, title: "Error" };
return { status: "error", message: angular.toJson(err.data.error), title: "Error" };
} else {
return { status: "error", message: err.status, title: "Error" };
}