fix: delete block try except in wrong place

This commit is contained in:
dettlaff 2024-12-11 04:03:58 +04:00
parent 62098493c4
commit 63ea78b1ef

View file

@ -146,6 +146,8 @@ class KanidmUserRepository(AbstractUserRepository):
timeout=0.8, # TODO: change timeout timeout=0.8, # TODO: change timeout
verify=False, # TODO: REMOVE THIS NOTHALAL!!!!! verify=False, # TODO: REMOVE THIS NOTHALAL!!!!!
) )
except Exception as error:
raise KanidmQueryError(f"Kanidm request failed! Error: {str(error)}")
logger.info(str(response)) logger.info(str(response))
response_data = response.json() response_data = response.json()
@ -167,9 +169,6 @@ class KanidmUserRepository(AbstractUserRepository):
else: else:
raise KanidmReturnEmptyResponse raise KanidmReturnEmptyResponse
except Exception as error:
raise KanidmQueryError(f"Kanidm request failed! Error: {str(error)}")
# nomatchingentries # nomatchingentries
@staticmethod @staticmethod