Summary
url.domainToASCII should print an empty string when an invalid domain is passed.
Version
deno 2.5.4 (stable, release, x86_64-unknown-linux-gnu)
v8 14.0.365.5-rusty
typescript 5.9.2
OS
Linux Mint 22 Wilma
Steps to reproduce
- Create file test.mjs with the following content:
import url from 'node:url';
console.log(url.domainToASCII('xn--iñvalid.com'));
- Run file
deno test.mjs.
Expected Behaviour
An empty string should be output.
Actual Behaviour
error: Uncaught (in promise) Error: Errors
at domainToASCII (ext:deno_node/internal/idna.ts:95:10)
at Object.domainToASCII (node:url:1136:10)