Pulp raises misleading message "Package matching query does not exist"
A user on pulp-list ran into this problem. Consider the case where you have a unique constraint for a Content unit that isn't part of the natural key. First, you hit this IntegrityError and Pulp assumes that there was a natural key conflict so it tries to look up the existing Content by natural key. However, since the unique constraint isn't part of the natural key, it hits a DoesNotExist and then logs "X matching query does not exist" which isn't helpful.