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...

КОМЕНТАРІ • 46

  • @anandshinde0358
    @anandshinde0358 6 днів тому +1

    Thank you so much sir ❤❤❤

  • @kapil7008
    @kapil7008 3 місяці тому +1

    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!

  • @sadakvali8930
    @sadakvali8930 Місяць тому +1

    PLease add BONUS VIDEO on error middleware also. for those who like to learn this at least.

  • @devstylus
    @devstylus 3 місяці тому

    Quite happy and it is very helpful, able to create my own backend using ts, mongoose, nextjs just seeing your videos , thank you

  • @rohanmalakar08
    @rohanmalakar08 3 місяці тому

    why we are not exporting default to all files any reason

  • @mostafashahat9760
    @mostafashahat9760 Місяць тому

    Awesome Video, keep it up

  • @PraveenLodhi-mz5qj
    @PraveenLodhi-mz5qj 2 місяці тому

    this series is a awesome

  • @miroslavilic2740
    @miroslavilic2740 2 місяці тому

    Waiting for the next video

  • @shobhitupadhyay6443
    @shobhitupadhyay6443 3 місяці тому

    8.20 this.success = statuscode

  • @sildistruttore
    @sildistruttore Місяць тому

    Thank you

  • @PraveenSingh-bk6bp
    @PraveenSingh-bk6bp 3 місяці тому

    Waiting for the next video 😊

  • @rahulaithal697
    @rahulaithal697 3 місяці тому

    Thanks ❤

  • @mohammedimran_shaik
    @mohammedimran_shaik 3 місяці тому

    Angular unit test case video pls

  • @DAME-Naveenav
    @DAME-Naveenav 3 місяці тому +4

    Make videos on backend through Spring boot you did videos on nodejs and django

  • @sumitkashyap1323
    @sumitkashyap1323 3 місяці тому

    Thank you so much sir 😊

  • @deadlylive_gaming7154
    @deadlylive_gaming7154 3 місяці тому

    thanks

  • @aryankhandelwal15
    @aryankhandelwal15 3 місяці тому

    ❤sir social media manager bnate h

  • @not_amanullah
    @not_amanullah 3 місяці тому

    This is helpful 🖤

  • @tayyabsami258
    @tayyabsami258 3 місяці тому

    🥰This is helpful

  • @Knock_O_ut
    @Knock_O_ut 2 місяці тому +1

    😊

  • @iamuseless0
    @iamuseless0 3 місяці тому

    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

    • @kashyapdiyora
      @kashyapdiyora 3 місяці тому

      Keep applying for jobs and improve the skills

  • @rishisingh1034
    @rishisingh1034 2 місяці тому

    done with this video

  • @muhammadyaseenakhtar7789
    @muhammadyaseenakhtar7789 3 місяці тому

    💕

  • @farazmobin2776
    @farazmobin2776 3 місяці тому

    like++; share++; comment++;

  • @priyadarshi5730
    @priyadarshi5730 3 місяці тому

    ❤❤❤

  • @not_amanullah
    @not_amanullah 3 місяці тому

    🤗☕

  • @imamansoni
    @imamansoni 3 місяці тому

    Attendence++ 😅

  • @babu32123
    @babu32123 3 місяці тому +1

    Use simple npm package
    express-error-catcher

  • @olahuuber5312
    @olahuuber5312 3 місяці тому

    Thanks ❤

  • @mastermind9711
    @mastermind9711 3 місяці тому +1

    Hello Hitesh, I would like to request that you cover how to create a secure and scalable backend in this series. Thank you.

  • @shwetanshusinha2690
    @shwetanshusinha2690 25 днів тому

    Amazing series sir. Thank u so much.

  • @abhinay.k
    @abhinay.k Місяць тому

    thank you sir

  • @JVMGROUP
    @JVMGROUP 3 місяці тому

  • @smsaikat9329
    @smsaikat9329 3 місяці тому

    ❤❤❤

  • @munna5553
    @munna5553 3 місяці тому

    Please complete this project, hindi wale ki tarah adha hi mat chhodna 😊

    • @anirbansaha9928
      @anirbansaha9928 3 місяці тому +1

      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

  • @not_amanullah
    @not_amanullah 3 місяці тому

    Thanks ❤

  • @astrobot_me
    @astrobot_me 2 місяці тому

    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 : )

  • @RohitVijayvargiya-gk7vg
    @RohitVijayvargiya-gk7vg 2 місяці тому

    FYI - you can also use npm library 'express-async-handler' instead of creating a custom handler

  • @ok98730
    @ok98730 3 місяці тому

    Yes... overwhelming ❤

  • @ampagetech2624
    @ampagetech2624 3 місяці тому

    Waiting for the next video - very interestin

  • @suvo910
    @suvo910 3 місяці тому

    Guruji I am coming ❤

  • @suvo910
    @suvo910 3 місяці тому

    Attendance sir+++

  • @Ajaysingh-zc9ho
    @Ajaysingh-zc9ho 3 місяці тому

    waiting for next video!