Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/routers/user_account_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ async def put(self, data: UserADGroupOperationsPUT):
operation_type=operation_type,
group_code=group_code,
)
except Exception as e:
except Exception:
logger.audit(
'Received an unexpected error while attempting to change user participation in project.',
user_email=user_email,
operation_type=operation_type,
group_code=group_code,
)
msg = 'Failed to add user to group'
logger.error(f'{msg}: {e.content.get("error_msg")}')
logger.exception(msg)
response.error_msg = msg
response.code = EAPIResponseCode.internal_error
response.total = 0
Expand Down Expand Up @@ -119,9 +119,9 @@ async def post(self, data: ADGroupCreatePOST):
async with IdentityClient() as client:
group_name = client.format_group_name(data.group_name)
await client.create_group(group_name, data.description)
except Exception as e:
except Exception:
msg = 'Failed to create group'
logger.error(f'{msg}: {e.content.get("error_msg")}')
logger.exception(msg)
response.error_msg = msg
response.code = EAPIResponseCode.internal_error
response.total = 0
Expand Down Expand Up @@ -153,7 +153,7 @@ async def delete(self, data: ADGroupCreateDELETE):
await client.delete_group(client.format_group_name(data.group_name))
except Exception as e:
msg = 'Failed to delete group'
logger.error(f'{msg}: {e.content.get("error_msg")}')
logger.exception(msg)
if type(e) == APIException:
response.error_msg = e.content.get('error_msg')
response.code = e.status_code
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "service_auth"
version = "2.2.30"
version = "2.2.31"
description = ""
authors = ["Indoc Research <admin@indocresearch.org>"]

Expand Down
Loading