Skip to content

Commit

Permalink
Adds error handler for registry errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin-sandhu committed Jan 29, 2025
1 parent 1cf9d09 commit fada625
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion maven/lib/dependabot/maven/update_checker/version_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fada625

Please sign in to comment.