Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test: classify core connection failures

Steven Enamakelfc349e070575
diff --git a/app/src/utils/__tests__/desktopDeepLinkListener.test.ts b/app/src/utils/__tests__/desktopDeepLinkListener.test.ts
index 734a29aa9d..ef180f1a87 100644
--- a/app/src/utils/__tests__/desktopDeepLinkListener.test.ts
+++ b/app/src/utils/__tests__/desktopDeepLinkListener.test.ts
@@ -551,6 +551,7 @@ describe('classifyAuthStoreFailure', () => {
// fail-closed error all collapsed into `other`.
it.each([
['CORE: auth.set_credential failed: boom', 'core'],
+ ['CORE: error sending request: tcp connect error: Connection refused', 'network'],
['BACKEND: could not resolve the backend URL', 'backend'],
['INVALID: a local session needs a user payload', 'invalid'],
[
diff --git a/app/src/utils/desktopDeepLinkListener.ts b/app/src/utils/desktopDeepLinkListener.ts
index 448b353782..78e4b828a6 100644
--- a/app/src/utils/desktopDeepLinkListener.ts
+++ b/app/src/utils/desktopDeepLinkListener.ts
@@ -408,7 +408,7 @@ export const classifyAuthStoreFailure = (failure: unknown): string => {
if (/\b401\b|unauthorized/.test(m)) return 'auth_me_unauthorized';
if (/\b50[234]\b|bad gateway|service unavailable|gateway timeout/.test(m))
return 'auth_me_gateway';
- if (/network|fetch failed|connection|dns|unreachable/.test(m)) return 'network';
+ if (/network|fetch failed|connection|connect|refused|dns|unreachable/.test(m)) return 'network';
if (/auth\/me|session validation failed/.test(m)) return 'auth_me_other';
// The owner's remaining prefixes (Rust `SessionError::{Core, Backend,
// Invalid}`), checked after the content buckets above so a `CORE:`-wrapped