Handle NotFound errors through status code.