
Async + Await
Syntax - Tasty Web Development Treats
00:00
How to Handle Errors in Async Functions
You can handle the error when you call it. There's no need to wrap it in a try catch You can just chain the promise based dot catch onto the end of it and then finally in node so pretty soon node is going to quit the process if you have an unhandled Um promise. If something goes wrong your entire server is going to fall over Uh in your website will go downSo what you can do to to sort of like um Catch yourself there is you can listen for an event called unhandled rejection So it's processed out on unhandled rejection And then i don't know whatever else you want to want to do with it or just eat the error and pretend it didn't happen
Play episode from 33:29
Transcript


