Skip to content

Commit d31bdcc

Browse files
raise on internet check
Co-authored-by: Alejandro Esquivel <[email protected]>
1 parent 9b90066 commit d31bdcc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

guardrails_api/utils/has_internet_connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
def has_internet_connection() -> bool:
55
try:
6-
requests.get("https://www.guardrailsai.com/")
6+
res = requests.get("https://www.guardrailsai.com/")
7+
res.raise_for_status()
78
return True
89
except requests.ConnectionError:
910
return False

0 commit comments

Comments
 (0)