Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handles an exception for non-existing repository #1713

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

git-hyagi
Copy link
Contributor

fixes: #1703

Comment on lines 1 to 3
Fixed an issue that triggered a `NoneType` exception during a GET request when
a `distribution` was created with only the `repository_version` (without specifying
a `repository`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Fixed an issue that triggered a `NoneType` exception during a GET request when
a `distribution` was created with only the `repository_version` (without specifying
a `repository`).
Fixed an issue causing an HTTP 500 error when a GET request for a non-existing blob was made to a distribution with only a `repository_version` set.

How about this? It does not talk about Python types. Users do not care about them.

Comment on lines 292 to 293
with self.assertRaises(requests.exceptions.HTTPError):
content_response.raise_for_status()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check that this returns 404 instead of 500?

@lubosmj lubosmj merged commit ae2c2f6 into pulp:main Jul 25, 2024
11 checks passed
Copy link

patchback bot commented Jul 25, 2024

Backport to 2.21: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.21/ae2c2f6d5132e98cd8dc2b93d428c542150080f5/pr-1713

Backported as #1719

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link

patchback bot commented Jul 25, 2024

Backport to 2.20: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.20/ae2c2f6d5132e98cd8dc2b93d428c542150080f5/pr-1713

Backported as #1720

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requesting blob that doesn't exist results in 500
3 participants