Propagate asExternalUri resolver errors#325925
Open
NgoQuocViet2001 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Distinguishes unhandled external URIs from resolver failures so genuine errors reach extensions while HTTP(S) fallback remains intact.
Changes:
- Adds a dedicated unhandled-resolver error.
- Continues through failing resolvers and propagates the last failure.
- Moves HTTP(S) fallback to the main thread and adds coverage.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/opener/common/opener.ts |
Defines the unhandled-resolver error. |
src/vs/editor/browser/services/openerService.ts |
Preserves resolver failures while trying subsequent resolvers. |
src/vs/workbench/api/browser/mainThreadWindow.ts |
Applies HTTP(S)-only fallback. |
src/vs/workbench/api/common/extHost.api.impl.ts |
Allows resolver failures to reach extensions. |
src/vs/editor/test/browser/services/openerService.test.ts |
Tests resolver outcomes and error propagation. |
src/vs/workbench/api/test/browser/mainThreadWindow.test.ts |
Tests fallback and propagation behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #162770
This change distinguishes an unhandled external URI from a resolver failure. HTTP and HTTPS URIs still fall back to the original URI when no resolver handles them, while actual resolver errors now propagate back to the extension. Resolver failures also do not prevent a later resolver from succeeding.
Tests cover the main-thread fallback and error path, plus multi-resolver success, failure, and unhandled cases.
Testing:
npm run typecheck-clientnpm run gulp compile-clientscripts\test.bat --grep MainThreadWindow(2 passing)scripts\test.bat --grep OpenerService(20 passing)npm run eslintnpm run valid-layers-check