Skip to content

Not using a supported scheme silently fails #115168

@TylerLeonhardt

Description

@TylerLeonhardt

Testing #114962

Notice the unsupported scheme below:

    context.subscriptions.push(vscode.window.registerExternalUriOpener(openerId, {
		canOpenExternalUri(uri: vscode.Uri) {
			return vscode.ExternalUriOpenerPriority.Preferred;
		},
		async openExternalUri(resolveUri: vscode.Uri) {
			console.log(resolveUri.toString());
			await vscode.env.openExternal(resolveUri);
		}
	}, {
		schemes: ['myextension'],
		label: 'Do the thing'
	}));

This code fails silently. If you open a link like myextension://blahhhhh, it will open in the browser. I know this scheme isn't supported, but if we're going to be strict about which schemes are supported, we should throw an error saying that this is not a supported scheme.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions