-
Notifications
You must be signed in to change notification settings - Fork 569
feat: Remove special cases for error messages #5117
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
base: major/3.0
Are you sure you want to change the base?
Conversation
❌ 14 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
sentrivana
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general looks good to me but we should make sure this is what we want because once we release it like this, it'll be tough to change.
How does this work with the old Starlette with the missing __str__? Or did we drop support for it already?
|
Good point regarding the old Starlette version. Their So our fix to add special handling of a To keep both worlds happy we could use
Starlette users would see a more meaningful value since Happy to hear other suggestions as well, especially since it'll be hard to change later. |
Description
Always stringify exception values using the
safe_str()method.The special-casing of the
messageanddetailattributes resulted in missing detail. Themessageattribute is a legacy from Python 2, and the detail attribute was returned directly because an old version of Starlette did not implement__str__for some exceptions.Issues
Closes #5050
Reminders
tox -e linters.feat:,fix:,ref:,meta:)