96 ms·
> One thing that burned me bad though was that without a `try` anywhere, my 100 line async function failed silently. You should be bubbling errors up to some t
by always_good 8y ago
> One thing that burned me bad though was that without a `try` anywhere, my 100 line async function failed silently.
You should be bubbling errors up to some top level and at least catching them there.
Wrapping entire async-fn bodies with try/catch (or outright overuse of try/catch) is probably the most ubiquitous beginner mistake I see in modern Javascript.
For example, imagine if your top level was even just run().catch(console.error).
- Waterluvian 8y agoI really need to find where to do that. It's inside a redux dispatch and I dunno... Nothing is catching them. It's just silent.
- efrafa 8y agoIts silent because its inside another promise and that one have catch that is swallowing it somewhere in the chain.