Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript REST APIs with Express Refactoring and Modularizing a REST API Refactor with Express Middleware

Use middleware to abstract away the try/catch block to DRY the code in rest API - but why not do it on delete and post?

In the video refactor with express middleware the teacher tells us to do it on all the functions, but when I downloaded it to compare it with my code she didn't abstract away the try/catch on delete and post.