Skip to content

Commit

Permalink
adds handlers for bad registry response
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin-sandhu committed Jan 31, 2025
1 parent 4ee82e0 commit 3638512
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions common/lib/dependabot/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def self.fetcher_error_details(error)
}
when Dependabot::PrivateSourceBadResponse
{
"error-type": "private_source_response_error",
"error-type": "private_source_bad_response",
"error-detail": { source: error.source }
}
when Octokit::Unauthorized
Expand Down Expand Up @@ -177,7 +177,7 @@ def self.parser_error_details(error)
}
when Dependabot::PrivateSourceBadResponse
{
"error-type": "private_source_response_error",
"error-type": "private_source_bad_response",
"error-detail": { source: error.source }
}
when Dependabot::GitDependenciesNotReachable
Expand Down Expand Up @@ -277,7 +277,7 @@ def self.updater_error_details(error)
}
when Dependabot::PrivateSourceBadResponse
{
"error-type": "private_source_response_error",
"error-type": "private_source_bad_response",
"error-detail": { source: error.source }
}
when Dependabot::DependencyNotFound
Expand Down
2 changes: 1 addition & 1 deletion docker/lib/dependabot/docker/update_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def tags_from_registry
rescue *transient_docker_errors
attempt ||= 1
attempt += 1
raise if attempt > 3
raise PrivateSourceBadResponse, registry_hostname if attempt > 3

retry
end
Expand Down

0 comments on commit 3638512

Please sign in to comment.