-
Notifications
You must be signed in to change notification settings - Fork 140
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
indexer-cli: indexing rule parser error catch #421
Conversation
Nice! Can we also output the help text after the message so the user can see what the supported parameters are? |
a3643c9
to
f16feaa
Compare
I ended up making a simple dumb suggestion function: if there's valid commands that shares 80% of the inputted letters, print those, otherwise print all available commands. Let me know if you think the help text would be better? |
f16feaa
to
cde4fd4
Compare
packages/indexer-common/src/indexer-management/models/indexing-rule.ts
Outdated
Show resolved
Hide resolved
d48a094
to
6240193
Compare
@hopeyen what's the status on this PR? Ready for another review? |
yep this one is ready for another review! thanks in advance |
a82cd26
to
cb16912
Compare
cb16912
to
7104b65
Compare
7104b65
to
d04b116
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
When using wrong arguments for
indexer rules set
, the error messageTypeError: INDEXING_RULE_PARSERS[key] is not a function
is not very clear.
Improve the error message to specify the invalid key: when provided a non-existing attribute, return messages like
Indexing rule attribute 'allocatoinAmount' doesn't exist, please check spelling
for next step: can make suggestions using modules like
spellchecker-cli