strawberry
strawberry copied to clipboard
Handling all route errors as strawberry errors
Description
Handle exceptions for FastAPI apps outside of the main schema - eg context_getter
Types of Changes
- [ ] Core
- [X] Bugfix
- [ ] New feature
- [ ] Enhancement/optimization
- [ ] Documentation
Issues Fixed or Closed by This PR
Checklist
- [X] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [X] I have read the CONTRIBUTING document.
- [X] I have added tests to cover my changes.
- [X] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:
Propagating schema context errors using GraphQL Error schema.
Here's the preview release card for twitter:

Here's the tweet text:
🆕 Release (next) is out! Thanks to Andy Challis for the PR 👏
Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)
Codecov Report
Merging #2589 (f397050) into main (3430d85) will increase coverage by
0.00%. The diff coverage is100.00%.
:exclamation: Current head f397050 differs from pull request most recent head 59fd23b. Consider uploading reports for the commit 59fd23b to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #2589 +/- ##
=======================================
Coverage 96.30% 96.30%
=======================================
Files 184 184
Lines 7571 7582 +11
Branches 1394 1394
=======================================
+ Hits 7291 7302 +11
Misses 179 179
Partials 101 101
@patrick91 bumping this
@ghandic sorry, I'll check this later in the week, can you tell more on why this is needed?
From what I remember it was for when an error came from within the context getter