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

Commit

Permalink
💥 Improve error message for invalid filter queries (#758)
Browse files Browse the repository at this point in the history
* Improve error message for invalid filter queries

* Update CHANGELOG.md

Co-authored-by: Marc-André Rivet <Marc-Andre-Rivet@users.noreply.github.com>
  • Loading branch information
chriddyp and Marc-Andre-Rivet committed Apr 21, 2020
1 parent 2ec0b43 commit 88613cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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);
}
}
}

0 comments on commit 88613cb

Please sign in to comment.