Skip to content

Commit

Permalink
Merge pull request #441 from dimagi/pkv/fix-create-user-bug
Browse files Browse the repository at this point in the history
Fix text check causing issues in hq user creation
  • Loading branch information
pxwxnvermx authored Nov 26, 2024
2 parents cc34026 + 9d7991a commit 0189b50
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 0189b50

Please sign in to comment.