Skip to content

Commit

Permalink
Handle additionnal requests excpetions in regulations_checkup (#2370)
Browse files Browse the repository at this point in the history
## Linked issues

- Resolve #2369
  • Loading branch information
VincentAntoine authored Jul 20, 2023
2 parents 903a453 + 1e5eebd commit 0207aac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion datascience/src/pipeline/flows/regulations_checkup.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,14 @@ def get_dead_links(
logger.info(f"{unknown_link} is a dead link.")
dead_links_urls.append(unknown_link)

except requests.HTTPError:
except (
requests.HTTPError,
requests.ConnectionError,
requests.exceptions.MissingSchema,
requests.exceptions.InvalidSchema,
requests.exceptions.InvalidURL,
) as e:
logger.info(f"{unknown_link} is a dead link (error {type(e)}: {e}).")
logger.info(f"{unknown_link} is a dead link.")
dead_links_urls.append(unknown_link)

Expand Down

0 comments on commit 0207aac

Please sign in to comment.