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: encode response content object returned from an exception handler. #3585

Merged

Conversation

rafalkrupinski
Copy link
Contributor

Description

When an handler raises an exception and exception handler returns a Response with a model (e.g. pydantic) object, encode that object with the app type_encoders.

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.25%. Comparing base (2e4b820) to head (39606b8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3585   +/-   ##
=======================================
  Coverage   98.25%   98.25%           
=======================================
  Files         328      328           
  Lines       14868    14870    +2     
  Branches     2366     2366           
=======================================
+ Hits        14609    14611    +2     
  Misses        117      117           
  Partials      142      142           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rafalkrupinski
Copy link
Contributor Author

@provinzkraut
Copy link
Member

Thanks @rafalkrupinski! I've left one suggestion

@provinzkraut provinzkraut enabled auto-merge (squash) June 20, 2024 18:06
@provinzkraut provinzkraut merged commit 883ca0a into litestar-org:main Jun 20, 2024
23 of 24 checks passed
@rafalkrupinski rafalkrupinski deleted the fix/encode-exception-content branch June 20, 2024 18:14
@rafalkrupinski
Copy link
Contributor Author

Thanks for merging! Can't wait for the release ;)

provinzkraut pushed a commit that referenced this pull request Jun 21, 2024
…r. (#3585)

fix: encode response content object returned from a exception handler.

Co-authored-by: Raphael Krupinski <3732079+rafalkrupinski@users.noreply.github.com>
(cherry picked from commit 883ca0a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants