-
Notifications
You must be signed in to change notification settings - Fork 14
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
parse failed message added in common import container #1823
parse failed message added in common import container #1823
Conversation
@Yagnik56 Just to clarify, can the "Invalid JSON" error message show up when importing an invalid JSON file? Shouldn't it be immediately converted to the compatibility table (with a single "Incompatible" row) if the JSON file is invalid when importing a feature flag? I'm asking because my PR (#1824) will remove the code changes you made with this PR (I had to resolve the merge conflicts). In my PR, it only shows the invalid CSV error message when the user uploads an invalid CSV file. |
@zackcl we have to pass observable (optional) as true to show that invalid message and it is dynamic so it will read the file type and show there. I just used JSON as an example, it works the same way for CSV. For JSON we won't pass observable value so it won't show that error. I know we don't want to show it for JSON but it will be nice to keep it dynamic with filetype we are choosing I feel. |
I'm not sure what you mean by "pass observable (optional) as true" but my PR basically does the same thing as what you did to show the invalid error message when the input variable
I just wanted to clarify if removing your code changes won't affect your other code for importing JSON file, and it seems it doesn't affect it since we never show it for JSON. Thanks! |
Rather than putting hard coded messages keep it dynamic for fileType, it will be better in my view. @zackcl |
I think it's fine to keep it static for now since it's never used for JSON. Also, the message is actually fine to be used for both types:
Also, I think we want to maintain such messages in the |
This PR contains the code change of adding a parse fail error message in a common import container.
(JSON is used to example only)