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

report extra information if a repo can't be found #8191

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/lib/dependabot/file_fetchers/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def clone_repo_contents
raise Dependabot::OutOfDisk
end

raise Dependabot::RepoNotFound, source
raise Dependabot::RepoNotFound.new(source, e.message)
end

def ecosystem_versions
Expand Down
4 changes: 2 additions & 2 deletions updater/lib/dependabot/file_fetcher_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def perform_job
Dependabot.logger.error("Repository is rate limited, attempting to retry in " \
"#{remaining}s")
else
Dependabot.logger.error("Error during file fetching; aborting")
Dependabot.logger.error("Error during file fetching; aborting: #{e.message}")
end
handle_file_fetcher_error(e)
service.mark_job_as_processed(@base_commit_sha)
Expand Down Expand Up @@ -144,7 +144,7 @@ def handle_file_fetcher_error(error)
# This also happens when a configured personal access token is not authz'd to fetch files from the job repo.
{
"error-type": "job_repo_not_found",
"error-detail": {}
"error-detail": { message: error.message }
}
when Dependabot::DependencyFileNotParseable
{
Expand Down
2 changes: 1 addition & 1 deletion updater/spec/dependabot/file_fetcher_command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
expect(api_client)
.to receive(:record_update_job_error)
.with(
error_details: {},
error_details: { message: "Dependabot::RepoNotFound" },
error_type: "job_repo_not_found"
)
expect(api_client).to receive(:mark_job_as_processed)
Expand Down