Skip to content

Commit

Permalink
leave actual error handling as is
Browse files Browse the repository at this point in the history
  • Loading branch information
helylle committed Sep 19, 2024
1 parent 1baf662 commit e80c910
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/eduid/graphdb/groupdb/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def db_setup(self):
for statement in statements:
try:
session.run(statement)
except ClientError as e:
except ClientError as e: # noqa: PERF203
assert e.message is not None # please mypy
acceptable_error_codes = [
"Neo.ClientError.Schema.ConstraintAlreadyExists",
Expand Down
2 changes: 1 addition & 1 deletion src/eduid/scimapi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def wrapper_run_func(*args, **kwargs):
while True:
try:
return func(*args, **kwargs)
except (EduIDDBError, EduIDGroupDBError, Neo4jError) as e:
except (EduIDDBError, EduIDGroupDBError, Neo4jError) as e: # noqa: PERF203
retry += 1
if retry >= max_retries:
raise MaxRetriesReached(f"Max retries reached for {func.__name__}")
Expand Down

0 comments on commit e80c910

Please sign in to comment.