Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Cheong committed Feb 10, 2023
1 parent e12d867 commit 9ce9327
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/EdgeGPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ def __init__(self) -> None:
if response.status_code != 200:
raise Exception("Authentication failed")
# Return response
self.struct = response.json()
try:
self.struct = response.json()
except json.decoder.JSONDecodeError:
raise Exception("Authentication failed. You have not been accepted into the beta.") from json.decoder.JSONDecodeError


class ChatHub:
Expand Down

0 comments on commit 9ce9327

Please sign in to comment.