adding error check to category routing

If the category doesn't exist in the list then we return a 404