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: invalid use of isinstance for HTTP exceptions checking #146

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

sorasful
Copy link
Contributor

@sorasful sorasful commented Apr 1, 2024

Pull Request Checklist

  • [X ] New code has 100% test coverage
  • (If applicable) The prose documentation has been updated to reflect the changes introduced by this PR
  • (If applicable) The reference documentation has been updated to reflect the changes introduced by this PR
  • [ X] Pre-Commit Checks were ran and passed
  • [ X] Tests were ran and passed

Description

I noticed in the exception_to_http_response that the way we check for exception was not valid.

We were using isinstance on the http_exc variable which is a class and not an instance which resulted in getting everytime we were on debug a 500 error even when we were supposed to ignore some exceptions.

@sorasful sorasful requested review from cofin and a team as code owners April 1, 2024 14:38
Copy link

sonarcloud bot commented Apr 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@cofin cofin merged commit b0f22e9 into litestar-org:main Apr 1, 2024
8 checks passed
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.

None yet

2 participants