khushi2706 / Blog-App-using-MERN-stack

Blog App build with MERN stack
https://blog-app-using-mern-stack-beta.vercel.app
83 stars 125 forks source link

Delete blog issues resolved. #8

Closed rohity20 closed 12 months ago

rohity20 commented 12 months ago

Fixed #1

The existing code lacks proper error handling, potentially leading to unhandled promise rejections and provides inconsistent HTTP status codes for different scenarios. The updated code addresses these issues by wrapping the entire operation in a try-catch block for robust error handling and sending appropriate HTTP status codes (404 for "Blog not found" and 500 for other errors).

rohity20 commented 12 months ago

I have deleted package-lock.json and yarn.lock files from the given repository.