Skip to content

Commit 1355a3a

Browse files
authored
Merge pull request #45 from arpitjain099/alert-autofix-65
Fix code scanning alert no. 65: Information exposure through an exception
2 parents 18eebbf + 0a9d856 commit 1355a3a

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)