Тёмный

Error Handling in NodeJS (Complete Guide) | Node Tutorial 

Nikita Dev
Подписаться 7 тыс.
Просмотров 43 тыс.
50% 1

In this video you'll learn about what kinds of errors to handle in NodeJS, how to best handle them, and how to create your own custom errors.
Code: github.com/nik...
Node Middleware: • What is middleware in ...
Node Request Validation: • How to Validate Reques...
Support Me: www.buymeacoff...
Contact Me: nikitadev292@gmail.com
#nodejs #javascript #api

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 57   
@emkay2
@emkay2 Год назад
The flow of your explanation just makes each step of the tutorial fall into place instantly. Thanks a lot!
@ljhastr
@ljhastr Год назад
As someone who is learning Node and finished with the basics of mongoDB & mongoose, error handling was still a little unclear to me. This helped out massively, thank you! earned a sub.
@mma-dost
@mma-dost Год назад
Same bro I was not able to clearly understand error handling.
@rohanshrestha8302
@rohanshrestha8302 Год назад
@@mma-dost Hey bro can you suggest some sites or mentors you followed to learn node
@khatariinsaan5284
@khatariinsaan5284 2 года назад
You will definetely going to become a successful youtuber Just keep uploading Regularly !
@emmafountain2059
@emmafountain2059 Год назад
Not only helped with JS error handling, but was a great introduction to error handling abstraction in general. This was a huge help!
@Anarchistry
@Anarchistry 8 месяцев назад
Error handling strategies was unclear for me like the "this" keyword. tnx for giving us ideas regarding on effective error handling. keep it up ❤
@_V__.
@_V__. 10 месяцев назад
I just came across a similar implementation in an old project at work, shame I didn’t watch this before then, it would’ve helped me a lot. Awesome video!
@josephuzuegbu7431
@josephuzuegbu7431 8 месяцев назад
This is the best error handling tutorial I have watched. Thanks
@perenelm4988
@perenelm4988 Год назад
Very straightforward explanation, thanks!
@mma-dost
@mma-dost Год назад
Thanks I really watched many tutorial about this topic but none was like yours. Thanks sir 💯💯
@plasthree
@plasthree 4 месяца назад
This is the most beautiful way i have seen 😮. Thanks so much.
@itsmess1088
@itsmess1088 Год назад
Super excellent video that really helps me a lot during refactoring the node project!! Thank you so much😃
@TrangBui-seeu
@TrangBui-seeu Год назад
This video is really helpful and straightforward. I can now know what’s wrong with my project properly 😂
@shiekkaleem4539
@shiekkaleem4539 Год назад
I have 4 years experience and i was handling errors inside the controller...this is more Clear
@jomarkpangan9362
@jomarkpangan9362 Год назад
Really great video. Clear, concise, fast. Just how I like it. subscribed!
@qgatss
@qgatss 5 месяцев назад
Thanks bro! This was really helpful, please keep uploading
@Programandoenc
@Programandoenc Год назад
Hello! Thank you for the video! Is this the correct way to handle errors for a production environment ? I've read its a good approach to add graceful shutdown. What do you think ? and where or when should we add this ?
@danielhaynes4747
@danielhaynes4747 2 года назад
Great video man! Keep up the good work and it will pay off! Thanks for the knowledge.
@nikita-dev
@nikita-dev 2 года назад
thank you!
@ycombinator765
@ycombinator765 2 года назад
bro please keep these quality videos coming. please
@davorjovanovic7174
@davorjovanovic7174 2 года назад
Perfect explanation!
@nikita-dev
@nikita-dev 2 года назад
thank you!
@vignesh-xb5uz
@vignesh-xb5uz Год назад
Lastly I found right one❣️
@manassingh1793
@manassingh1793 Год назад
You earned a sub man. What a fantastic video.
@VipulPatel-cd6sm
@VipulPatel-cd6sm Год назад
Very well explained 👍. Thanks man.
@MrQerem
@MrQerem 12 дней назад
What extension are you using to run node in VSCode?
@nelsonleone2508
@nelsonleone2508 Год назад
Please which extension are you using ? The grey intellisense, seems like tabnine but i guess it's not
@Aelsaan
@Aelsaan Год назад
Thx a lot for this simple and efficient tutorial
@usamajaved3231
@usamajaved3231 Год назад
To the point. Subscribed👍👍
@Talel_kraiem
@Talel_kraiem Год назад
Amazing tutorial ❤
@NoeVidal3
@NoeVidal3 Год назад
Wow, thanks man! great video!!
@rohanshrestha8302
@rohanshrestha8302 Год назад
Hello there, I am kind of new to node, and as I'm learning all the videos seem to focus just on file read and write, events and http request, it that all of it in node, as documentation is not similar to laravel, it is a bit hard for me to switch please help
@baruntiwari8152
@baruntiwari8152 11 месяцев назад
Awesome bro... panda gang op
@pytha12
@pytha12 2 года назад
Great job! 👏 Keep it up!
@anahitafakhravar1878
@anahitafakhravar1878 Год назад
You helped me a lot. Thank you so much.
@renkzk_dev
@renkzk_dev 8 месяцев назад
thank you, very helpful
@MrGangel77
@MrGangel77 7 месяцев назад
How do you export the actual AppError class and use it in those other files? You don't seem to do that but I'm having to do module.exports for that class then importing it in the other files??
@nikita-dev
@nikita-dev 7 месяцев назад
I'm exporting the AppError class by doing: module.exports = AppError; then importing it by doing: const AppError = require("./AppError"); I have a video about Node JS module imports/exports if you want to learn more about how this works!
@MrGangel77
@MrGangel77 7 месяцев назад
@@nikita-dev cheers. I emailed u too :P
@omsatpathy5455
@omsatpathy5455 Год назад
very clearly explained.
@aleksey6151
@aleksey6151 2 года назад
Amazing
@sachintharuka6154
@sachintharuka6154 9 месяцев назад
Helpful video❤
@whoamicommand
@whoamicommand Год назад
How about to write tryCatch function in such form: exports.tryCatch = fn => (req, res, next) => fn(req, res, next).catch(next); Looks cleaner
@mma-dost
@mma-dost Год назад
really great bro . respect++
@fadfooood
@fadfooood Год назад
Why do I need to throw an error and then catch it? I mean if !user then return next(error); Is there any benefit or throwing and catching again?
@nikita-dev
@nikita-dev Год назад
Great question! The benefit is that all of your error handling code will be in one place -- the error handler middleware -- and it will reduce repetition. If you were to send the error response in your controllers (instead of passing the error on), you would have to write "res.status(400).send(msg)" every time. Once your routes become complex and there are multiple different checks, you would be repeating yourself a lot. It's much cleaner to just pass the error on to the error handler middleware, and then define the error response there (once).
@mma-dost
@mma-dost Год назад
thanks for asking the doubt bro I was also used to think why not just send res.json(error).status(400) like that.
@prafulsrivastava8942
@prafulsrivastava8942 Год назад
Great content!
@hafidnurfirmansyah2839
@hafidnurfirmansyah2839 2 года назад
New subcriber
@parthkolgiri7501
@parthkolgiri7501 Год назад
Thanks man!
@박재욱-m6n
@박재욱-m6n Год назад
very helpful
@27sosite73
@27sosite73 Год назад
super!
@himansuiii
@himansuiii 5 месяцев назад
Thankssssssssssssssss
@abdulazeez.98
@abdulazeez.98 Год назад
I had to dislike this video, the explanation was good but you covered Express error handling, not Node. By that I mean the ones which crash the node server.
@27sosite73
@27sosite73 Год назад
super!
Далее
5 Async + Await Error Handling Strategies
18:11
Просмотров 22 тыс.
How to handle Node.js errors like a Pro?
12:44
Просмотров 31 тыс.
Node.js is a serious thing now… (2023)
8:18
Просмотров 653 тыс.
Express Error Handling
7:03
Просмотров 1,1 тыс.
Go Pointers: When & How To Use Them Efficiently
14:09