diff --git a/common/query_manager/query_parser/ppl_query_parser.ts b/common/query_manager/query_parser/ppl_query_parser.ts index 9a39276e0c..e3acc54dd4 100644 --- a/common/query_manager/query_parser/ppl_query_parser.ts +++ b/common/query_manager/query_parser/ppl_query_parser.ts @@ -20,6 +20,12 @@ export class PPLQueryParser { getStats() { this.visitor = new StatsAstBuilder(); - return this.visitor.visitRoot(this.parser!.root()).getTokens(); + let inter = null; + try { + inter = this.visitor.visitRoot(this.parser!.root()).getTokens(); + } catch (e) { + console.error(e); + } + return inter; } }