My Calendar App is a full-stack application designed to help users manage their schedules, expenses, todos, and notes all in one place. The app provides a seamless and intuitive user interface for efficient day-to-day management and includes robust backend support for secure data handling and user authentication.
Is your feature request related to a problem? Please describe.
I am proposing of writing the common utility AsyncHandler which is going to eliminate the need for try...catch block in every route. If an error occurs in an asynchronous code inside the handler, the asyncHandler will catch it and respond with a structured error message.
Wrapping my Controller logic within this AsyncHandler utility.
Why I am Proposing this ??
Writing try...catch for every controller is cumbersome and it's a good practise to use try...catch while writing the controllers with this utility we can focus on writing the try...catch block once and just importing this utility and wrapping our function in this as mentioned above
.
Screenshots
If applicable, add screenshots to help explain your problem.
screenshots/video of feature
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
I am proposing of writing the common utility
AsyncHandler
which is going to eliminate the need for try...catch block in every route. If an error occurs in an asynchronous code inside the handler, the asyncHandler will catch it and respond with a structured error message.Describe the solution you'd like
Wrapping my Controller logic within this AsyncHandler utility.
Why I am Proposing this ?? Writing try...catch for every controller is cumbersome and it's a good practise to use try...catch while writing the controllers with this utility we can focus on writing the try...catch block once and just importing this utility and wrapping our function in this as mentioned above . Screenshots If applicable, add screenshots to help explain your problem.
screenshots/video of feature Add any other context or screenshots about the feature request here.
check list