-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: catch hub org loading errors, fallback to local #6769
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
base: main
Are you sure you want to change the base?
Conversation
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.
cubic analysis
2 issues found across 1 file • Review in cubic
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
configLoadInterrupted, | ||
}); | ||
|
||
return { config, errors, configLoadInterrupted }; | ||
if (injectErrors) { |
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.
Injected validation errors are added after listeners are notified, so listeners never receive them
Prompt for AI agents
Address the following comment on core/config/ConfigHandler.ts at line 500:
<comment>Injected validation errors are added after listeners are notified, so listeners never receive them</comment>
<file context>
@@ -454,22 +477,35 @@ export class ConfigHandler {
}
}
- const { config, errors, configLoadInterrupted } =
- await this.currentProfile.reloadConfig(this.additionalContextProviders);
+ const {
+ config,
+ errors = [],
+ configLoadInterrupted,
</file context>
...orgDescs.map((org) => this.getNonPersonalHubOrg(org)), | ||
]); | ||
// TODO make try/catch more granular here, to catch specific org errors | ||
return { orgs }; |
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.
Previously collected validation errors are silently dropped because the return statement omits the errors array
Prompt for AI agents
Address the following comment on core/config/ConfigHandler.ts at line 188:
<comment>Previously collected validation errors are silently dropped because the return statement omits the errors array</comment>
<file context>
@@ -161,28 +160,52 @@ export class ConfigHandler {
this.currentOrg = selectedOrg;
this.currentProfile = selectedOrg.currentProfile;
- await this.reloadConfig(reason);
+ await this.reloadConfig(reason, errors);
} catch (e) {
- if (e instanceof Error && e.message.includes("AbortError")) {
+ if (signal.aborted) {
return;
</file context>
return { orgs }; | |
return { orgs, errors }; |
Description
Catches hub org loading errors
Summary by cubic
Handled errors when loading organizations from Continue Hub by falling back to local assistants if Hub loading fails.