[explore] show the broken query when failing (#1871)

* Return query when failing

* Linting

* sjson -> simplejson
This commit is contained in:
Maxime Beauchemin
2017-01-05 10:00:39 -08:00
committed by GitHub
parent e3b296c558
commit c14c7edc5e
9 changed files with 132 additions and 116 deletions

View File

@@ -142,7 +142,13 @@ class ChartContainer extends React.Component {
},
error(msg) {
props.actions.chartUpdateFailed(msg);
let payload = { error: msg };
try {
payload = JSON.parse(msg);
} catch (e) {
// pass
}
props.actions.chartUpdateFailed(payload.error, payload.query);
},
d3format: (col, number) => {