Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Add error handling to API pulls

Katosf0942f0714e2
diff --git a/.github/scripts/update_currencies.py b/.github/scripts/update_currencies.py
index c7be4de9..95ad2d9a 100644
--- a/.github/scripts/update_currencies.py
+++ b/.github/scripts/update_currencies.py
@@ -5,6 +5,10 @@ import os
def fetch_currencies():
response = requests.get('https://restcountries.com/v3.1/all')
response.raise_for_status()
+ except requests.RequestException as e:
+ print(f"An error occurred: {e}")
+ return []
+
countries = response.json()
currencies_list = []