Skip to content

Commit

Permalink
Fix code scanning alert no. 56: 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 75d1e85 commit e40c6cf
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 @@ -358,7 +358,8 @@ def create_access_rule(rule_id: str):
access_rule = permissions_manager.create_access_rule(rule_id, resources, members)
return Response(response=json.dumps(access_rule.to_item()), status=201)
except (TypeError, NullValueError, MissingPropertyError) as e:
return Response(response=str(e), status=400)
logging.error(f"Validation error in create_access_rule: {e}", exc_info=True)
return Response(response="Invalid input provided.", status=400)
except CosmosConflictError as e:
return Response(response=str(e), status=409)
except Exception as e:
Expand Down

0 comments on commit e40c6cf

Please sign in to comment.