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

Show error dialog when imported collection or environment is invalid #35

Open
alexandrehtrb opened this issue Aug 20, 2023 · 0 comments
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@alexandrehtrb
Copy link
Owner

Currently, when an invalid collection or environment file is imported and its contents are invalid, no error message appears. It would be good to have an indication to the user that the imported file is invalid.

The logic would need to be added in else clauses of the TryImport... calls:

// First, tries to import as a Pororoca collection
if (isPororocaCollection)
{
if (TryImportPororocaCollection(fileContent, preserveId: false, out var importedPororocaCollection))
{
mwvm.AddCollection(importedPororocaCollection!);
}
}
// If not a valid Pororoca collection, then tries to import as a Postman collection
else
{
if (TryImportPostmanCollection(fileContent, out var importedPostmanCollection))
{
mwvm.AddCollection(importedPostmanCollection!);
}
}

@alexandrehtrb alexandrehtrb added help wanted Extra attention is needed good first issue Good for newcomers labels Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant