fix(server): Stop re-probing hosting CLIs for unrecognized hosts (#19692)
Co-authored-by: Victor Vogel <[email protected]> Co-authored-by: Jorrin <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
7 files changed
+404
-68
No files matched your search
@@ -269,10 +269,14 @@ export const makeDiscovery = Effect.gen(function* () {
|
||||
// Identity resolution also probes providers before a web base URL is known.
|
||||
const url = URL.parse(context.provider.baseUrl);
|
||||
if (!url?.host) return Effect.succeed(null);
|
||||
// A timeout or keyring failure propagates: the registry does not keep that answer.
|
||||
return api.credential(url.host).pipe(
|
||||
Effect.as(true),
|
||||
Effect.catchTags({ GitHubHostDisabledError: () => Effect.succeed(true) }),
|
||||
Effect.orElseSucceed(() => false),
|
||||
Effect.catchTags({
|
||||
GitHubCliMissingError: () => Effect.succeed(false),
|
||||
GitHubHostDisabledError: () => Effect.succeed(true),
|
||||
GitHubNotSignedInError: () => Effect.succeed(false),
|
||||
}),
|
||||
Effect.map((known) =>
|
||||
known
|
||||
? ({
|
||||
|
||||
Reference in new issue
Block a user