class Dependabot::Clients::Bitbucket
def get(url)
def get(url) response = Excon.get( URI::RFC2396_PARSER.escape(url), user: credentials&.fetch("username", nil), password: credentials&.fetch("password", nil), # Setting to false to prevent Excon retries, use BitbucketWithRetries for retries. idempotent: false, **Dependabot::SharedHelpers.excon_defaults( headers: auth_header ) ) raise Unauthorized if response.status == 401 raise Forbidden if response.status == 403 raise NotFound if response.status == 404 if response.status >= 400 raise "Unhandled Bitbucket error!\n" \ "Status: #{response.status}\n" \ "Body: #{response.body}" end response end