Skip to content

Commit

Permalink
Raise registry error when the remote server failed to provide the req…
Browse files Browse the repository at this point in the history
…uested resource.
  • Loading branch information
“Thavachelvam committed Feb 5, 2025
1 parent 605f4a7 commit 23ef9e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ def self.package_manager_run_command(name, command, fingerprint: nil)
result
rescue StandardError => e
Dependabot.logger.error("Error running package manager command: #{full_command}, Error: #{e.message}")
if e.message.include?("\e[38;5;111mResponse Code\e[39m: \e[38;5;220m404\e[39m (Not Found)\n") &&
e.message.include?("The remote server failed to provide the requested resource")
raise RegistryError.new(404, "The remote server failed to provide the requested resource")
end

raise
end

Expand Down

0 comments on commit 23ef9e0

Please sign in to comment.