Add an Error Handling Middleware Function to the Index file
Closed this issue · 9 comments
lugenx commented
We need to add an error handling middleware function to catch and respond to unexpected errors.
Here are the steps to add the middleware function:
- Create an error handling middleware function inside the
server/src/middleware
folder that catches and responds to unexpected errors. - Import and use the error handling middleware function at the end of the index.js file.
- Test the error handling middleware function by intentionally triggering errors.
AbhiramKrishnaM commented
May i be assigned to this task
lugenx commented
Assigned, thanks.
AbhiramKrishnaM commented
Hey, added the unexpected error module. I have also added a error test route, which basically throws an error.
AbhiramKrishnaM commented
hey updated the error module, can you check please
AbhiramKrishnaM commented
@lugenx hey did you check the pr ?
lugenx commented
this issue is available if someone wants to work on this.
AbhiramKrishnaM commented
its fixed no ? i dont understand
Dinesh-Khanal commented
I will work on this issue, can you assign it for me?
lugenx commented
@Dinesh-Khanal assigned, thank you.