diff --git a/selfprivacy_api/repositories/users/kanidm_user_repository.py b/selfprivacy_api/repositories/users/kanidm_user_repository.py index 19369f6..1563e9f 100644 --- a/selfprivacy_api/repositories/users/kanidm_user_repository.py +++ b/selfprivacy_api/repositories/users/kanidm_user_repository.py @@ -236,12 +236,12 @@ class KanidmUserRepository(AbstractUserRepository): timeout=1, verify=False, # TODO: REMOVE THIS NOT HALAL!!!!! ) + response_data = response.json() + except Exception as error: logger.error(f"Kanidm query error: {str(error)}") raise KanidmQueryError(error_text=str(error)) - response_data = response.json() - if response.status_code != 200: if isinstance(response_data, dict): plugin_error = response_data.get("plugin", {})