fixing main and build updates
Some checks failed
Build and Deploy Docker Container / build-and-deploy (push) Failing after 4s
Some checks failed
Build and Deploy Docker Container / build-and-deploy (push) Failing after 4s
This commit is contained in:
3
main.py
3
main.py
@@ -40,7 +40,7 @@ messages = {
|
||||
}
|
||||
|
||||
|
||||
def get_tenor_img(search_term: str = "420") -> str:
|
||||
def get_tenor_img(search_term: str = "420") -> str | None:
|
||||
results = []
|
||||
try:
|
||||
results = search_tenor(search_term=search_term)
|
||||
@@ -77,6 +77,7 @@ def search_tenor(search_term: str = "420") -> list:
|
||||
data = response.json()
|
||||
if data["results"]:
|
||||
return data["results"]
|
||||
return []
|
||||
except requests.RequestException as e:
|
||||
logging.error(f"Error fetching Tenor GIF: {e}")
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user