Skip to content

Commit 0a9d856

Browse files
Fix code scanning alert no. 65: Information exposure through an exception
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent bc8c79f commit 0a9d856

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
@@ -238,7 +238,8 @@ def create_user_group(group_id: str):
238238
except (TypeError, NullValueError, MissingPropertyError) as e:
239239
return Response(response=str(e), status=400)
240240
except CosmosConflictError as e:
241-
return Response(response=str(e), status=409)
241+
logging.error("A conflict error occurred while creating user group: %s", e, exc_info=True)
242+
return Response(response="A conflict error has occurred.", status=409)
242243
except Exception as e:
243244
logging.error("An error occurred while creating user group: %s", e, exc_info=True)
244245
return Response(response="An internal error has occurred.", status=500)

0 commit comments

Comments
 (0)