-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat: error message for invalid variants #316
Conversation
8e84968
to
599b32a
Compare
I realize this definitely would've been better feedback on the issue rather than its PR, but I don't know if I like a top-level What if we added this functionality under a I'm happy to sketch out more of this idea in that issue too :) |
f088dec
to
6edc65b
Compare
83cc542
to
2ea558b
Compare
2ea558b
to
965f57a
Compare
315a4dc
to
46fa6ed
Compare
blech i force pushed something into a merge commit. gotta double make sure we squash and merge this one lol. |
graph_name: String, | ||
invalid_variant: String, | ||
valid_variants: Vec<String>, | ||
frontend_url_root: String, |
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.
Love the use of frontend_url_root
🙌
fixes #208 by providing a helpful error message when trying to fetch an invalid variant
when we find a variant that's pretty close to a variant that exists in the registry:
when there's only one variant in the registry and the provided variant isn't similar to any of them
when there are only two variants in the registry and the provided variant isn't similar to any of them
when there are between 3 and 10 variants in the registry and the provided variant isn't similar to any of them
when there are over 10 variants in the registry