diff --git a/maven/lib/dependabot/maven/update_checker/version_finder.rb b/maven/lib/dependabot/maven/update_checker/version_finder.rb index 100d6f2266..52f79427ee 100644 --- a/maven/lib/dependabot/maven/update_checker/version_finder.rb +++ b/maven/lib/dependabot/maven/update_checker/version_finder.rb @@ -204,7 +204,10 @@ def fetch_dependency_metadata(repository_details) nil rescue Excon::Error::Socket, Excon::Error::Timeout, Excon::Error::TooManyRedirects - raise if central_repo_urls.include?(repository_details["url"]) + if central_repo_urls.include?(repository_details["url"]) + msg = "Registry error: #{T.must(response).status} response status with body #{T.must(response).body}" + raise RegistryError.new(T.must(response).status, msg) + end nil end