From ae7ac0058690872469b5c450e811b7303e180f18 Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Sat, 15 Jan 2022 17:40:32 -0300 Subject: [PATCH] Mapped network problem (DNS failure, connection refused, etc) --- scripts/validate/links.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/validate/links.py b/scripts/validate/links.py index 5d57416f..90038684 100644 --- a/scripts/validate/links.py +++ b/scripts/validate/links.py @@ -172,14 +172,18 @@ def check_if_link_is_working(link: str) -> Tuple[bool, str]: has_error = True error_message = f'ERR:CLT: {code} : {link}' - except (TimeoutError, requests.exceptions.ConnectTimeout): - has_error = True - error_message = f'ERR:TMO: {link}' - except requests.exceptions.SSLError as error: has_error = True error_message = f'ERR:SSL: {error} : {link}' + except requests.exceptions.ConnectionError as error: + has_error = True + error_message = f'ERR:CNT: {error} : {link}' + + except (TimeoutError, requests.exceptions.ConnectTimeout): + has_error = True + error_message = f'ERR:TMO: {link}' + except requests.exceptions.TooManyRedirects as error: has_error = True error_message = f'ERR:TMR: {error} : {link}'