Skip to content

Comment on Async/await support in Firefoxparent

Comments

You could always do something like:

   const maybe = await fetch(url).catch(err => err);
But, I can understand that being a bit icky for some... but in a few cases it could make sense and is pretty concise:
   const hits = await cache.incr(key).catch(err => 0);
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.