lugenx/ecohabit

Add an Error Handling Middleware Function to the Index file

Closed this issue · 9 comments

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:

  1. Create an error handling middleware function inside the server/src/middleware folder that catches and responds to unexpected errors.
  2. Import and use the error handling middleware function at the end of the index.js file.
  3. Test the error handling middleware function by intentionally triggering errors.

May i be assigned to this task

Assigned, thanks.

Hey, added the unexpected error module. I have also added a error test route, which basically throws an error.

hey updated the error module, can you check please

@lugenx hey did you check the pr ?

this issue is available if someone wants to work on this.

its fixed no ? i dont understand

I will work on this issue, can you assign it for me?

@Dinesh-Khanal assigned, thank you.