Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Improved error message for ACS
Browse files Browse the repository at this point in the history
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: pulp#2667
pulp#2667
  • Loading branch information
pavelpicka committed Jul 28, 2022
1 parent a62aaf1 commit d905545
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/2667.bugfix
@@ -0,0 +1 @@
Improved error message for Alternate Content Source refresh when it has insufficient permissions.
7 changes: 7 additions & 0 deletions pulp_rpm/app/tasks/synchronizing.py
Expand Up @@ -293,6 +293,13 @@ def normalize_url(url_to_normalize):
# If 'custom_url' is passed it is a call from ACS refresh
# which doesn't support mirror lists.
if custom_url:
if exc.status >= 400:
raise ValueError(
_(
"ACS remote for url '{}' raised an error '{} {}'. "
"Please check your ACS remote configuration."
).format(custom_url, exc.status, exc.message)
)
raise ValueError(
_("Remote URL {} for Alternate Content Source is invalid").format(custom_url)
)
Expand Down

0 comments on commit d905545

Please sign in to comment.