Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the error message for unsupported facet filters #940

Open
RFSH opened this issue Mar 28, 2022 · 0 comments
Open

Improve the error message for unsupported facet filters #940

RFSH opened this issue Mar 28, 2022 · 0 comments
Labels
error-handling Anything related to error handling logic

Comments

@RFSH
Copy link
Member

RFSH commented Mar 28, 2022

When users open the recordset page with preexisting facets, chaise and ermrestjs will validate the facet filters. The validation will ensure the given source or sourcekey is valid, and also, for entity choice pickers, the given choices represent a row in the database.

If ermrestjs finds any issues, it will throw an UnsupportedFilters error. The error message will try to summarize the problems as long as it can find a proper displayname for each encoded facet using the following format:

Some (or all) externally supplied filter criteria cannot be implemented with the current catalog content. 
This may be due to lack of permissions or changes made to the content since the criteria were initially saved.

> Discarded facets: <facet-1-name>, <facet-2-name>, ...

> Facets with some discarded choices: <facet-1-name>, <facet-2-name>, ...


--------------
Show details:

Discarded facets:

- <facet-1-name> (<summary>)
  - <list of choices>
...

Partially discarded facets:
- <facet-1-name> (<summary>)
  - <list of choices>
...

As you can see, we're trying to name each facet for error purposes. For this, we are using markdown_name or sourcekey defined on the object, and if the object doesn't have any of these properties, it will skip adding any details for the facet.

Since we're skipping details for some facets, this can be misleading, and therefore we should improve this. One case that we saw was a facet blob that had proper structure, but the encoded choice didn't exist anymore. In this case, we could use the name from the list of facets.

We should go over the cases where this can happen and see how we can provide a better error message.

@RFSH RFSH removed the enhancement label Apr 11, 2022
@jrchudy jrchudy added the error-handling Anything related to error handling logic label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-handling Anything related to error handling logic
Projects
None yet
Development

No branches or pull requests

2 participants