Commit 6bd781c6 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

fix httpx

parent 7b2b629d
Pipeline #14238 failed with stage
in 7 minutes and 43 seconds
......@@ -88,7 +88,7 @@ class Forge(Links, NamedModel):
logger.debug(f'requesting api {self} {url}, page {page}')
try:
return httpx.get(self.api_url() + url, {'page': page}, verify=self.verify, headers=self.headers())
except httpx.exceptions.ConnectionError:
except httpx.HTTPError:
logger.error(f'requesting api {self} {url}, page {page} - SECOND TRY')
return httpx.get(self.api_url() + url, {'page': page}, verify=self.verify, headers=self.headers())
......@@ -494,7 +494,7 @@ class Repo(TimeStampedModel):
return httpx.get(self.api_url() + url, {'page': page},
verify=self.forge.verify,
headers=self.forge.headers())
except httpx.exceptions.ConnectionError:
except httpx.HTTPError:
logger.error(f'requesting api {self.forge} {self.namespace} {self} {url}, page {page} - SECOND TRY')
return httpx.get(self.api_url() + url, {'page': page},
verify=self.forge.verify,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment