Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Litestar): Apply failed_request_status_codes to exceptions raised in middleware #4074

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

vrslev
Copy link
Contributor

@vrslev vrslev commented Feb 19, 2025

This is a fix for #4021: exceptions raised in middleware were sent without taking into account failed_request_status_codes value.

See the test case for an example.


Thank you for contributing to sentry-python! Please add tests to validate your changes, and lint your code using tox -e linters.

Running the test suite on your PR might require maintainer approval. The AWS Lambda tests additionally require a maintainer to add a special label, and they will fail until this label is added.

@vrslev vrslev marked this pull request as ready for review February 19, 2025 08:43
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.20%. Comparing base (48ebd73) to head (6ac821b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4074      +/-   ##
==========================================
- Coverage   79.55%   79.20%   -0.35%     
==========================================
  Files         140      140              
  Lines       15517    15522       +5     
  Branches     2630     2630              
==========================================
- Hits        12344    12294      -50     
- Misses       2338     2399      +61     
+ Partials      835      829       -6     
Files with missing lines Coverage Δ
sentry_sdk/integrations/asgi.py 86.01% <100.00%> (+0.40%) ⬆️
sentry_sdk/integrations/litestar.py 84.76% <100.00%> (+0.10%) ⬆️

... and 10 files with indirect coverage changes

@vrslev
Copy link
Contributor Author

vrslev commented Feb 20, 2025

Relates to #3134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant