Skip to content

Commit

Permalink
Merge pull request #46 from arpitjain099/alert-autofix-38
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 38: Information exposure through an exception
  • Loading branch information
arpitjain099 authored Oct 20, 2024
2 parents 1355a3a + d8e6936 commit 0466d2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion End_to_end_Solutions/AOAISearchDemo/app/data/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ def create_user_group(group_id: str):
user_group = entities_manager.create_user_group(group_id, group_name, users)
return Response(response=json.dumps(user_group.to_item()), status=201)
except (TypeError, NullValueError, MissingPropertyError) as e:
return Response(response=str(e), status=400)
logging.error("A validation error occurred: %s", e, exc_info=True)
return Response(response="A validation error has occurred.", status=400)
except CosmosConflictError as e:
logging.error("A conflict error occurred while creating user group: %s", e, exc_info=True)
return Response(response="A conflict error has occurred.", status=409)
Expand Down

0 comments on commit 0466d2c

Please sign in to comment.