Fix hang in router.route('/posts/:id').get()

Ensure that router.route('/posts/:id').get() returns a value
Stop processing a request if an error occurs