Skip to content

Commit 0466d2c

Browse files
authored
Merge pull request #46 from arpitjain099/alert-autofix-38
Fix code scanning alert no. 38: Information exposure through an exception
2 parents 1355a3a + d8e6936 commit 0466d2c

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
@@ -236,7 +236,8 @@ def create_user_group(group_id: str):
236236
user_group = entities_manager.create_user_group(group_id, group_name, users)
237237
return Response(response=json.dumps(user_group.to_item()), status=201)
238238
except (TypeError, NullValueError, MissingPropertyError) as e:
239-
return Response(response=str(e), status=400)
239+
logging.error("A validation error occurred: %s", e, exc_info=True)
240+
return Response(response="A validation error has occurred.", status=400)
240241
except CosmosConflictError as e:
241242
logging.error("A conflict error occurred while creating user group: %s", e, exc_info=True)
242243
return Response(response="A conflict error has occurred.", status=409)

0 commit comments

Comments
 (0)