3 ms·
> For readability’s sake, I have removed try/catch wrappings here that you should be doing in practice. You should never not catch errors, but makes the async/a
by koolba 7y ago
> For readability’s sake, I have removed try/catch wrappings here that you should be doing in practice. You should never not catch errors, but makes the async/await concept way easier to understand.
On the contrary, you should never catch errors unless you’re actually going to handle them. A try/catch silently ignoring failures means you don’t care about the operation’s result. The default should be bubbling up errors to a centralized error handler.
Async functions make this even more convenient as all errors now become promise rejections.