Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Improve error message for invalid filter queries #758

Merged
merged 3 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- [#732](https://github.com/plotly/dash-table/pull/732) Fix a bug where opening a dropdown scrolled the table down its last row
- [#731](https://github.com/plotly/dash-table/pull/731) Fix a bug where `data=None` and `columns=None` caused the table to throw an error

## Changed
- [#758](https://github.com/plotly/dash-table/pull/758) Improve error message for invalid filter queries

## [4.6.2] - 2020-04-01
### Changed
- [#713](https://github.com/plotly/dash-table/pull/713) Update from React 16.8.6 to 16.13.0
Expand Down
4 changes: 2 additions & 2 deletions src/core/syntax-tree/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class SyntaxTree {

evaluate = (target: any) => {
if (!this.isValid) {
const msg = `unable to evaluate target: syntax tree is invalid for query=${this.query}`;
const msg = `DataTable filtering syntax is invalid for query: ${this.query}`;

Logger.error(msg);
throw new Error(msg);
Expand Down Expand Up @@ -90,4 +90,4 @@ export default class SyntaxTree {

return toStructure(this.syntaxerResult.tree);
}
}
}