Nodejs Error Handling in Production: What You're Doing Wrong (2024)

preview_player
Показать описание

Here is the source code link along with the workflow files:

If my effort is helping you! You can buy me a Coffee:

Previous Episodes:

Microservice source code:
Рекомендации по теме
Комментарии
Автор

The way you explain complex concepts with such clarity and enthusiasm has not only made advanced topics accessible but also incredibly engaging. Your content has provided me insights and skills that are essential for our growth and development👌.

huzaifaasif
Автор

Oh how I waited for this video! Thank you so much for making it! :)

talkohavy
Автор

Thank you for this series. keep up the good work.

varileshtlesht
Автор

Can you put a link of all the diagrams that you draw ? 🙂 it will be very helpful . thank you for your hardworking . good luck !!

manothmc
Автор

Hi Jay, once again thanks for this good series. Would u mind guiding us what's your thought process when dividing/spliting the microservices? For example, what should our mind be thinking when we are designing and dividing the microservices.

weijiephua
Автор

Thank you for this wonderful series Jay ! Also do you have source code of a version of this project with minimal frontend within it?

Aditya-xede
Автор

Hi Jay,
I just finished watching the video in full and I have a follow-up question.
Should each micro-service handle its own errors? Or should there be like some Global middleware that all micro-services share?
What is the best practice on that?

talkohavy
Автор

hi Sir, how can i run this project with frontend when i download from your github

HaoBui-tfbv
Автор

hi jay, first thank you for nice lecture .
i have a question. the question is
[NotFoundError, ValidationError, AuthorizeError].forEach((typeofError)=>{
console.log(error instanceof typeofError);
if(error instanceof typeofError){
console.log(typeof typeofError);
reportError = false;
}
});

this code capture whether the 'error' is instance of 3 classes. but 'error' is an object and [notfound, validation, authroize] are classes.
i think this code is not working properly. is it right ?

shy-soonyubing
Автор

You're coupling http concern in your Service by throwing those errors which contain an HTTP status code. Why? The Service defines the business logic and the handler defines the HTTP concern.

mroobert