Adding some exception handling in the route.