Skip to content

Commit 332552f

Browse files
authored
Merge pull request #37 from arpitjain099/alert-autofix-66
Fix code scanning alert no. 66: Information exposure through an exception
2 parents 1dac837 + dc2a53c commit 332552f

File tree

1 file changed

+2
-1
lines changed
  • End_to_end_Solutions/AOAISearchDemo/app/data

1 file changed

+2
-1
lines changed

End_to_end_Solutions/AOAISearchDemo/app/data/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ def update_user_group(group_id: str):
281281
user_group = entities_manager.add_users_to_user_group(group_id, new_users)
282282
return Response(response=json.dumps(user_group.to_item()), status=200)
283283
except (TypeError, NullValueError, MissingPropertyError, ValueError) as e:
284-
return Response(response=str(e), status=400)
284+
logging.error("An error occurred while updating user group: %s", e, exc_info=True)
285+
return Response(response="An internal error has occurred.", status=400)
285286
except SessionNotFoundError as e:
286287
logging.error("Session not found: %s", e, exc_info=True)
287288
return Response(response="Session not found.", status=404)

0 commit comments

Comments
 (0)