Комментарии:
This channel is a hidden gem, far better than many channels. Loved all the videos. Must subscribe people. 🫡
ОтветитьOmg I am a self educated begginer developer, and 3 days ago, I did the same thing. I just felt the need to throw custom error. Im glad I fid the right thing
ОтветитьThanks for this.
Ответитьsuch a great video one thing i missed here is . I saw a comment of someone on stack overflow, guy created asyncWrapper as customer middleware around all api routes
const asyncWrapper = (cb) => {
return (req, res, next) => cb(req, res, next).catch(next);
};
I want to know your opinion on this approach.
Basically i am learning nodejs and i wanted to make sure that if i missed any error handling in my api there should be some place from where i can simply return 500 instead of terminating the process or let it get timeout that will of course cause issue on server end.
It's pronounced walla"bee".
ОтветитьGreat video. Subscribed!, I have been also following same approach. Would like to request you to consider making videos for topic like best practice, code quality, optimization, debugging, performant code etc.
ОтветитьGreat video. Subscribed!
ОтветитьNot long ago I had to revamp the error handling system of over 20 projects with over 5 different approachs mixed within them.
Working on an enterprise level for a multibillion dollar company that has this kind of anti-pattern and literally no code review can be a nightmare, but it is extremely educational.
Took me not much more than a couple of weeks of work time, but I am glad to see that the final result is pretty much what you taught on this video.
Most junior and mid-level developers dont pay a lot of attention to error handling. This video is absolute gold in terms of best practices.
OMG it is so helpful, I am feeling like a Pro now😅
ОтветитьI have been using a very similar `RequestError` class to throw errors inside my express controllers and components.
I then have a single app.use() middleware that catches and handles errors from `instanceof RequestError` and `instanceof ZodError`.
It makes the code a lot easier to read as it reduces a lot of control flow
awesome in depth video, explained very nicely. Next time in my app Ill try to do the things you just demonstrated, need more video like this. You might also consider making videos for topic like best practice, code quality, optimization, debugging, performant code etc. Just a bit of content ideas from me thats all. overall keep up the good work!
Ответить