Skip to content

Commit

Permalink
Fix wrong text check causing issues in hq user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
pxwxnvermx committed Nov 26, 2024
1 parent cc34026 commit 9d7991a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commcare_connect/users/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def create_hq_user(user, domain, api_key):
try:
hq_request.raise_for_status()
except httpx.HTTPStatusError as e:
if e.response.status_code == 400 and "already exists" in e.response.text:
if e.response.status_code == 400 and "already taken" in e.response.text:
return True
raise CommCareHQAPIException(
f"{e.response.status_code} Error response {e.response.text} while creating user {user.username}"
Expand Down

0 comments on commit 9d7991a

Please sign in to comment.