From 9d33cbb9455b54eb07c7e154fc485a0d1564612e Mon Sep 17 00:00:00 2001 From: Daniel Holmgren <dtholmgren@gmail.com> Date: Tue, 30 May 2023 19:09:02 -0500 Subject: [PATCH] Don't throw on dns lookup errors (#1122) discard dns lookup errors --- packages/identity/src/handle/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/identity/src/handle/index.ts b/packages/identity/src/handle/index.ts index 50b42af67e0..518056f5b39 100644 --- a/packages/identity/src/handle/index.ts +++ b/packages/identity/src/handle/index.ts @@ -1,4 +1,3 @@ -import { isErrnoException } from '@atproto/common-web' import dns from 'dns/promises' import { HandleResolverOpts } from '../types' @@ -43,10 +42,7 @@ export class HandleResolver { try { chunkedResults = await dns.resolveTxt(`${SUBDOMAIN}.${handle}`) } catch (err) { - if (isErrnoException(err) && err.code === 'ENOTFOUND') { - return undefined - } - throw err + return undefined } const results = chunkedResults.map((chunks) => chunks.join('')) const found = results.filter((i) => i.startsWith(PREFIX))