Skip to content

Conversation

gagik
Copy link
Contributor

@gagik gagik commented Nov 4, 2024

Adds better handling of 0 collections/databases and errors to #863. Instead of silently quitting, it shows the error.

Description

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@gagik gagik changed the base branch from main to gagik/one-no-collection-handling November 4, 2024 12:50
log.error('No databases found');
if (databases === undefined) {
stream.markdown(
vscode.l10n.t('An error occurred when getting the databases.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we surface the error to users here? Something like permission issues is more transparent then.

Copy link
Contributor Author

@gagik gagik Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, not sure how to word it right. could something like "An error occurred while getting the databases. You may lack the necessary permissions. work or we can be even more explicit?

Base automatically changed from gagik/one-no-collection-handling to main November 8, 2024 13:45
Copy link
Member

@Anemy Anemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Nice error handling ux improvements

@gagik gagik merged commit d5a9345 into main Nov 8, 2024
6 checks passed
@gagik gagik deleted the gagik/no-database-or-collection-error branch November 8, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants