mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
Merge pull request #3856 from Gueust/elasticsearc_fix_error
Serialize an elasticsearch error previously printed as 'Object'
This commit is contained in:
commit
0ea651f1df
@ -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" };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user