summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHikeri <95499256+hikeri@users.noreply.github.com>2023-04-27 21:56:43 +0200
committerGitHub <noreply@github.com>2023-04-27 21:56:43 +0200
commit2b4079f8a9acc4ce70c6e4b3b7fa99f4c5bc9738 (patch)
tree39315d5dbcda4594266171a5668402110a40674b
parentUpdate README.md (diff)
downloadgpt4free-2b4079f8a9acc4ce70c6e4b3b7fa99f4c5bc9738.tar
gpt4free-2b4079f8a9acc4ce70c6e4b3b7fa99f4c5bc9738.tar.gz
gpt4free-2b4079f8a9acc4ce70c6e4b3b7fa99f4c5bc9738.tar.bz2
gpt4free-2b4079f8a9acc4ce70c6e4b3b7fa99f4c5bc9738.tar.lz
gpt4free-2b4079f8a9acc4ce70c6e4b3b7fa99f4c5bc9738.tar.xz
gpt4free-2b4079f8a9acc4ce70c6e4b3b7fa99f4c5bc9738.tar.zst
gpt4free-2b4079f8a9acc4ce70c6e4b3b7fa99f4c5bc9738.zip
-rw-r--r--forefront/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/forefront/__init__.py b/forefront/__init__.py
index 44f5d44d..615057f8 100644
--- a/forefront/__init__.py
+++ b/forefront/__init__.py
@@ -38,9 +38,12 @@ class Account:
"email_address": mail_adress
}
)
-
- trace_token = response.json()['response']['id']
- if logging: print(trace_token)
+
+ try:
+ trace_token = response.json()['response']['id']
+ if logging: print(trace_token)
+ except KeyError:
+ return 'Failed to create account!'
response = client.post(
f"https://clerk.forefront.ai/v1/client/sign_ups/{trace_token}/prepare_verification?_clerk_js_version=4.32.6",