toDataQueryResponse: check arrow parse errors (#24349)

This commit is contained in:
Ryan McKinley 2020-05-06 08:46:33 -07:00 committed by GitHub
parent 75ce947267
commit d747fcf9c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,12 +37,17 @@ export function toDataQueryResponse(res: any): DataQueryResponse {
if (dr.dataframes) {
for (const b64 of dr.dataframes) {
const t = base64StringToArrowTable(b64);
const f = arrowTableToDataFrame(t);
if (!f.refId) {
f.refId = refId;
try {
const t = base64StringToArrowTable(b64);
const f = arrowTableToDataFrame(t);
if (!f.refId) {
f.refId = refId;
}
rsp.data.push(f);
} catch (err) {
rsp.state = LoadingState.Error;
rsp.error = toDataQueryError(err);
}
rsp.data.push(f);
}
}
}