Antonio Cheong
commited on
Commit
·
9ce9327
1
Parent(s):
e12d867
Better error messages
Browse files- src/EdgeGPT.py +4 -1
src/EdgeGPT.py
CHANGED
@@ -126,7 +126,10 @@ class Conversation:
|
|
126 |
if response.status_code != 200:
|
127 |
raise Exception("Authentication failed")
|
128 |
# Return response
|
129 |
-
|
|
|
|
|
|
|
130 |
|
131 |
|
132 |
class ChatHub:
|
|
|
126 |
if response.status_code != 200:
|
127 |
raise Exception("Authentication failed")
|
128 |
# Return response
|
129 |
+
try:
|
130 |
+
self.struct = response.json()
|
131 |
+
except json.decoder.JSONDecodeError:
|
132 |
+
raise Exception("Authentication failed. You have not been accepted into the beta.") from json.decoder.JSONDecodeError
|
133 |
|
134 |
|
135 |
class ChatHub:
|