-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix/issue 7208 Improve connection error handling and proxy support #7478
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
Conversation
@su0as note failing tests |
error, | ||
); | ||
// Only attempt to update YAML schemas if the YAML extension is installed | ||
const yamlExtension = vscode.extensions.getExtension("redhat.vscode-yaml"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the standard yaml extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. redhat.vscode-yaml is the standard Red Hat YAML extension. I added an inline comment to make that explicit.
); | ||
|
||
if (!statusCode && isConnectionError) { | ||
errorContent = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most users seeing a network error would not have proxy configured, and this might point users to the wrong place. In the majority of cases it is probably internet flake or no internet connection. That is, once the proxy is configured correctly, then it should generally work, and it's nice to have configuration errors but a low proportion of users use proxies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjusted. It now leads with internet flake/outage and invalid apiBase; proxy guidance is last and phrased as “If you’re behind a corporate proxy, verify proxy settings in your IDE (http.proxy, http.proxyStrictSSL) or your NO_PROXY configuration."
…; respect VS Code proxy in WorkOsAuthProvider; improve GUI connection error guidance (resolves continuedev#7208)
…sAuthProvider (continuedev#7208)\n\n- Respect VS Code proxy and SSL settings via http config when refreshing tokens\n- Use shared fetch with proxy support\n- Safer access to workspace in tests\n\nRelated: continuedev#7208
…larify Red Hat YAML extension id comment; format files with Prettier
…tch and allow third-arg options
…ferences (unblocks CI TS error)
… fix DocsIndexingStatus type errors
75579a7
to
d4c0c1a
Compare
Summary
Addresses issue #7208, improving error handling of model/network responses and respecting IDE proxy settings.
Changes
VS Code extension:
◦ Auth: WorkOsAuthProvider now respects VS Code proxy and SSL settings (http.proxy, http.proxyStrictSSL) and uses the shared fetch that supports proxies.
◦ YAML: Register JSON schema for YAML only if the Red Hat YAML extension is present (prevents noisy errors).
◦ Manifest: Authentication provider declared to eliminate provider declaration warnings.
GUI:
◦ Error dialog updated to provide actionable guidance for connection/network issues (mentioning proxy settings).
Rationale/Impact
• Reduces failures in proxied/enterprise environments, improves user guidance, and removes spurious warnings. Localized and low-risk; no infra or dependency changes.
• Repro/Verification
• Configure a proxy in VS Code or via environment settings; simulate blocked control-plane access to see improved UX and proxy-awareness.
• Type checks and lint pass. Some tests require API keys; those remain skipped/expected. E2E harness shows environment-specific flakiness but unrelated to these changes.
Notes
• No new dependencies; uses existing @continuedev/fetch.
• Backwards compatible and easy to rollback.
Summary by cubic
Improves connection error handling and proxy support in the VS Code extension and GUI to reduce failures behind corporate proxies and provide clearer guidance. Addresses #7208.