Saturday, 3 November 2018

Can someone evaluate my promise-chaining/error handling please?

I posted my code a few weeks ago and one very kind person went through my code with a fine-tooth comb and gave me a ton of useful advice (a lot of you did).I implemented almost all of the advice I was given, but there's one thing that's still tripping me up. Promise chaining and bubbling my errors up to the main .catch statement in my actual app logic. I tried to implement the advice that I was given, but this caused my routes to stop working completely. So I reverted that and now I'm trying to have all my nested promises have their own catch statement which... I don't know if that's an OK way to handle it? Or if that causes the initial promise to hang if the app throws an error inside the nested promise?Anyways, that's enough blabbering from me. Here is my controllers folder, I would appreciate it if anyone could take a look and shed some light on fixing my error handling/returning promises.https://ift.tt/2PaNrED you!

Submitted November 03, 2018 at 07:16PM by ibrahimpg

No comments:

Post a Comment