mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-30 12:46:39 +00:00
fix: try to except kanidm errors
This commit is contained in:
parent
51a663bc0a
commit
d4dada174a
|
@ -155,7 +155,7 @@ class KanidmUserRepository(AbstractUserRepository):
|
|||
|
||||
response = response.json()
|
||||
|
||||
if response.get("plugin"):
|
||||
if response["plugin"]:
|
||||
if response["plugin"].get("attrunique") == "duplicate value detected":
|
||||
raise UserAlreadyExists # TODO only user?
|
||||
|
||||
|
@ -165,6 +165,7 @@ class KanidmUserRepository(AbstractUserRepository):
|
|||
raise KanidmQueryError(f"Kanidm request failed! Error: {str(error)}")
|
||||
|
||||
# {"plugin": {"attrunique": "duplicate value detected"}}
|
||||
# nomatchingentries
|
||||
|
||||
@staticmethod
|
||||
def create_user(
|
||||
|
|
Loading…
Reference in a new issue