Error.cause β don't lose the root cause when you rethrow
loadUser() calls fetchJSON() calls parse() β a real
SyntaxError is thrown three layers down. Toggle whether each catch block
rethrows with or without { cause: err }, then trigger
the failure and watch how much of the original error survives to the top.
catch block actually runsThis is the same pattern at both fetchJSON's and loadUser's catch blocks β only the { cause: err } option changes.
No error yet. Trigger the failure to see what the top-level catch receives.
The chain shows every error the top-level catch can reach by walking .cause.