Standardised error and response from server in MERN
Вставка
- Опубліковано 28 вер 2024
- In this video tutorial by Hitesh, part of a comprehensive backend series, we explore the importance of standardizing error and response handling in MERN stack applications. This practice, commonly seen in professional codebases, is often overlooked but essential for maintaining clean and efficient code. Hitesh introduces the concept of creating helper utilities, such as an asynchronous handler (async Handler), which simplifies error management across various HTTP requests by wrapping them in try-catch blocks. This ensures that errors are handled gracefully without redundant code. Additionally, he discusses standardizing API responses using custom classes like APIResponse and APIError, making sure that every response sent to the frontend is consistent and informative. These practices, although optional, are crucial for building scalable and maintainable applications. The video provides step-by-step instructions on implementing these utilities, helping developers understand the significance of higher-order functions, error handling, and response standardization in Node.js and Express environments. Whether you're a beginner or a seasoned developer, adopting these best practices will elevate the quality of your codebase.
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year.
Get all source code for react application:
github.com/hit...
All source code is available at my Github account:
github.com/hit...
Our Open-Source Project is here: freeapi.app
Join me at whatsapp: hitesh.ai/what...
for community discord: hitesh.ai/discord
Instagram pe yaha paaye jaate h:
/ hiteshchoudharyofficial
Learn React with 10 projects: • Let's learn react from...
Learn Docker: • A practical guide on D...
Learn Kubernetes: • Complete Kubernetes Co...
How does a browser works: • How does a browser wor...
How nodejs works: • How node JS works | En...
Learn Redux-toolkit: • Learn Redux Toolkit in...
Learn NextJS: • Nextjs Full stack course
Learn Typescript: • Why to learn Typescript
Learn Javascript: • Welcome to new JavaScr...
Learn React Native: • React Native Mastery: ...
Learn Zustand: • React state management...
Learn Golang: • How to get started wit...
Thank you so much sir ❤❤❤
brother I saw your backend playlist from last 1-1.5 month and I am learning much. But the thing I get confused in is cloudinary private URL that does not allow any unauthorized person to get files through entering file's URL in browser, so I want to request you to please either teach us HOW TO UPLOAD FILES PRIVATELY ON CLOUDINARY THROUGH JS or MAKE A SMALL VIDEO OR CRASH COURSE ON CLOUDINARY....... btw I love all your videos that being only 15 I want to get skilled in development like you 💓💓. LOTS OF LOVE!
Khel bhai abhi coding hoti rhegi😢😅
PLease add BONUS VIDEO on error middleware also. for those who like to learn this at least.
Quite happy and it is very helpful, able to create my own backend using ts, mongoose, nextjs just seeing your videos , thank you
why we are not exporting default to all files any reason
Awesome Video, keep it up
this series is a awesome
Waiting for the next video
8.20 this.success = statuscode
Thank you
Waiting for the next video 😊
Thanks ❤
Angular unit test case video pls
Make videos on backend through Spring boot you did videos on nodejs and django
Thank you so much sir 😊
thanks
❤sir social media manager bnate h
This is helpful 🖤
🥰This is helpful
😊
Sir i completed btech in july 2023, since then i am unemployed and gap is increasing, i am learning different skills but am not in the eligibility criteria of most of the companies, sir please suggest what to do about the increasing gap
Keep applying for jobs and improve the skills
done with this video
💕
like++; share++; comment++;
❤❤❤
🤗☕
Attendence++ 😅
Use simple npm package
express-error-catcher
Thanks ❤
Hello Hitesh, I would like to request that you cover how to create a secure and scalable backend in this series. Thank you.
Amazing series sir. Thank u so much.
thank you sir
❤
❤❤❤
Please complete this project, hindi wale ki tarah adha hi mat chhodna 😊
Can you tell me the roadmap plzz
How to follow this channel along with the chai and code hindi channel im not getting how use his playlists like what should be the roadmap
Thanks ❤
Awesome Video Sir .. its little Hard for me now to understand but I believe I will eventually get the concepts .. Thanks for teaching the way you are doing : )
FYI - you can also use npm library 'express-async-handler' instead of creating a custom handler
Yes... overwhelming ❤
Waiting for the next video - very interestin
Guruji I am coming ❤
Attendance sir+++
waiting for next video!