Skip to content

Commit

Permalink
Fix code scanning alert no. 65: Information exposure through an excep…
Browse files Browse the repository at this point in the history
…tion

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent bc8c79f commit 0a9d856
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 @@ -238,7 +238,8 @@ def create_user_group(group_id: str):
except (TypeError, NullValueError, MissingPropertyError) as e:
return Response(response=str(e), status=400)
except CosmosConflictError as e:
return Response(response=str(e), status=409)
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)
except Exception as e:
logging.error("An error occurred while creating user group: %s", e, exc_info=True)
return Response(response="An internal error has occurred.", status=500)
Expand Down

0 comments on commit 0a9d856

Please sign in to comment.