From 299518d9357ca81efa12f295f65086708f392531 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 26 Apr 2021 19:39:55 +0000 Subject: fix(tls): throw meaningful error when hostname is invalid (#10387) `InvalidDNSNameError` is thrown when a string is not a valid hostname, e.g. it contains invalid characters, or starts with a numeric digit. It does not involve a (failed) DNS lookup. --- cli/tests/unit/tls_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts index fa869037e..0528c8043 100644 --- a/cli/tests/unit/tls_test.ts +++ b/cli/tests/unit/tls_test.ts @@ -32,7 +32,7 @@ unitTest( await assertThrowsAsync(async () => { await Deno.connectTls({ hostname: "127.0.0.1", port: 3567 }); - }, Error); + }, TypeError); listener.close(); }, -- cgit v1.2.3