Repository navigation
fix(desktop): report unreachable GitHub as unavailable in viewerGithub #9174
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import { Octokit } from "@octokit/core"; | ||
| import { isGitHubUnreachableError } from "@superset/host-service"; | ||
| import { LocalGitCredentialProvider } from "@superset/host-service/git-credentials"; | ||
| import { | ||
| githubErrorCode, | ||
|
|
@@ -68,7 +69,9 @@ export function createViewerGithubRouter( | |
| ); | ||
| } catch (error) { | ||
| throw new TRPCError({ | ||
| code: githubErrorCode(error), | ||
| code: isGitHubUnreachableError(error) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve GraphQL response errors before matching transport text. For an inaccessible repository named Classify GraphQL response errors before applying the transport-text matcher.
|
||
| ? "SERVICE_UNAVAILABLE" | ||
| : githubErrorCode(error), | ||
| message: | ||
| error instanceof Error && error.message ? error.message : fallback, | ||
| cause: error, | ||
|
|
||
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.
Script executed:
Repository: ParadevAI/Paradev
Length of output: 1819
Script executed:
Repository: ParadevAI/Paradev
Length of output: 43125
Script executed:
Repository: ParadevAI/Paradev
Length of output: 41577
Script executed:
Repository: ParadevAI/Paradev
Length of output: 559
Script executed:
Repository: ParadevAI/Paradev
Length of output: 4618
Script executed:
Repository: ParadevAI/Paradev
Length of output: 428
Script executed:
Repository: ParadevAI/Paradev
Length of output: 9125
Import the classifier through a lightweight host-service subpath.
The package-root import loads
createAppand its application dependency graph. That graph reaches@superset/i18n, whose entrypoint imports the untracked generated cataloglocales/en/messages. A fresh direct desktop test can fail before the viewer-GitHub tests run. Export the classifier separately and import that subpath.Suggested fix