Skip to content

Conversation

@aliu39
Copy link
Member

@aliu39 aliu39 commented Nov 7, 2025

@aliu39 aliu39 requested a review from a team as a code owner November 7, 2025 19:47
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 7, 2025
return resp.data["data"]
# Add project_slug field.
result = resp.data["data"]
project = Project.objects.get(id=result["project_id"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Broken Contract: Unhandled Project Not Found

The Project.objects.get(id=result["project_id"]) call lacks exception handling for Project.DoesNotExist. If the replay metadata contains a project_id for a deleted or inaccessible project, the function will crash with an unhandled exception instead of returning None as documented. This breaks the function's contract and differs from the error handling pattern used consistently elsewhere in the same file.

Fix in Cursor Fix in Web

@aliu39 aliu39 enabled auto-merge (squash) November 7, 2025 19:55
@aliu39 aliu39 merged commit fa7d37d into master Nov 7, 2025
66 checks passed
@aliu39 aliu39 deleted the aliu/replay-md-update branch November 7, 2025 20:09
@codecov
Copy link

codecov bot commented Nov 8, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/seer/explorer/tools.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #102978      +/-   ##
===========================================
+ Coverage   79.63%    80.63%   +1.00%     
===========================================
  Files        9093      9095       +2     
  Lines      392632    392745     +113     
  Branches    24972     24972              
===========================================
+ Hits       312666    316687    +4021     
+ Misses      79568     75660    -3908     
  Partials      398       398              

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants