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

Unhandled Error in case of unknown clusterId in Resource Loader #959

Open
sentry-io bot opened this issue Jan 24, 2025 · 1 comment
Open

Unhandled Error in case of unknown clusterId in Resource Loader #959

sentry-io bot opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
direct resources Connecting to or interacting with Kafka or Schema Registry through a "direct" connection.

Comments

@sentry-io
Copy link

sentry-io bot commented Jan 24, 2025

From Sentry Issue: VSCODE-EXTENSION-HR

Error: Unknown connectionId b678c432-8763-4465-816a-ab9736f10b0f
  File "..\src\storage\resourceLoader.ts", line 60, in {_ResourceLoader#2}.getInstance
    throw new Error(`Unknown connectionId ${connectionId}`);
  File "..\src\viewProviders\topics.ts", line 205, in {_TopicViewProvider#2}.updateTreeViewDescription
    const loader = ResourceLoader.getInstance(cluster.connectionId);
  File "..\src\viewProviders\topics.ts", line 184, in currentKafkaClusterChangedSub
    await this.updateTreeViewDescription();
  File "app:///extensionHostProcess.js", line 30, in P.B
  File "app:///extensionHostProcess.js", line 30, in P.fire
...
(3 additional frame(s) were not displayed)
@noeldevelops
Copy link
Member

In the stack trace it seems like the user changed the Current Cluster and the resource loader somehow got passed an unknown ID to the updateTreeViewDescription() function.

At minimum, let's handle the error to prevent crash/Sentry alert. But I'm curious how this happened and how could we reproduce?

@shouples shouples self-assigned this Jan 24, 2025
@shouples shouples added the direct resources Connecting to or interacting with Kafka or Schema Registry through a "direct" connection. label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
direct resources Connecting to or interacting with Kafka or Schema Registry through a "direct" connection.
Projects
None yet
Development

No branches or pull requests

2 participants