raise 404 if resource is empty