NestJS Error Handling Logging and Validation Best Practices

preview_player
Показать описание
In this video we work on error handling to both avoid a catastrophic server crash and also to handle any errors that may occur with a particular end point in a custom way. We also look at logging both with Morgan and custom error logging. Finally, we have a quick look at validation. Error handling, logging, and validation combined is a best practice to ensure the server is running as expected and also provide important insights.

--------------------------------------------------
Recommended Udemy courses
--------------------------------------------------

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

6:40 Error 500
8:11 We can use a catch all so the server doesn't crash
8:30 Wrap the code that causes the 500 in an if statement and throw new HttpException

JanacMeena
Автор

Hello! Can you explain me why the project uses different data types user.class.ts and post.interface.ts files, and not, for example, only classes? I'm a little confused, I can't figure out which is better to use yet.

taras
Автор

How do you get imports after selecting method or class etc?

Please let know the exact keys you were using.

samiullahsheikh