mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
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.
This commit is contained in:
parent
87c055b371
commit
299518d935
4 changed files with 22 additions and 16 deletions
|
@ -32,7 +32,7 @@ unitTest(
|
|||
|
||||
await assertThrowsAsync(async () => {
|
||||
await Deno.connectTls({ hostname: "127.0.0.1", port: 3567 });
|
||||
}, Error);
|
||||
}, TypeError);
|
||||
|
||||
listener.close();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue