Version: Deno 2.2.12.
Reading a broken symbolic-link on Linux fails with Too many levels of symbolic links (a misleading message that could be improved).
#!/usr/bin/env -S deno --allow-read
/*
* Reproduction steps on Linux:
* 1. Create `file.txt`.
* 2. Create a `link.txt` symbolic-link to `file.txt`.
* 3. Code below works.
* 4. Delete the original `file.txt`.
* 5. Run script again.
*
* Error: Too many levels of symbolic links (os error 40): readfile 'link.txt'.
* Expected behavior: a message about a broken-link not "too many links".
*/
let text=await Deno.readTextFile('link.txt')
console.log(text)