Skip to content

Commit

Permalink
Fix error handling in kawaiiembed function
Browse files Browse the repository at this point in the history
  • Loading branch information
sravan1946 committed Jun 9, 2024
1 parent 84d668c commit 9f41b4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions perform/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ async def kawaiiembed(
)
try:
url = await api_call(f"https://kawaii.red/api/gif/{endpoint}/token={api_key}")
except ContentTypeError:
return "The API is currently down, please try again later."
except (ContentTypeError, KeyError):
return "The API returned an error. Please try again later."
embed.set_image(url=url)

return embed
Expand Down

0 comments on commit 9f41b4e

Please sign in to comment.