-
Notifications
You must be signed in to change notification settings - Fork 0
error: missing update #5
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
Conversation
|
Blar here! I see an error and a lack of description—classic! Starting my review now, let's squash those bugs. |
|
This PR modifies the 'ValidationException' class constructor in 'fastapi/exceptions.py' to accept an additional 'mistakes' parameter, which is stored in the instance along with 'errors'. The commit message 'error: missing update' suggests this change was made to address a specific issue or to improve exception handling, although the exact purpose isn't explicitly described. The overall goal appears to be enhancing the exception's informational capacity by including more context via the 'mistakes' parameter. Pull Request Impact: 5 🔄 File Changes Overview
📊 Impact SummaryThis tables shows the impact of the changes in the codebase
📜 Blar InstructionsBlar Commands
Tags Explanation
|
| def __init__(self, errors: Sequence[Any], mistakes: Sequence[Any]) -> None: | ||
| self._errors = errors | ||
| self._mistakes = mistakes |
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.
🔴 Error 🐛 Bug
Constructor signature of ValidationException requires both 'errors' and 'mistakes'.
Issue Explanation
ValidationException.__init__signature now requires two positional parameters:errorsandmistakes.mistakeshas no default value, so omitting it triggers a TypeError.- Existing instantiations like
ValidationException(errors)now fail at runtime. - File: blarApp/fastapi/fastapi/exceptions.py
def __init__(self, errors: Sequence[Any], mistakes: Sequence[Any]) -> None:
self._errors = errors
self._mistakes = mistakesReply if you have any questions or let me know if I missed something.
Don't forget to react with a 👍 or 👎 to the comments made by Blar to help us improve.
|
❕ It looks like we couldn't find any design patterns in the Wiki for this repository. Let's add some at: app.blar.io/wiki Review's done! 🚀 Check out the feedback and let me know if you need anything! – Blar |
|
Did your developer sleep through the Python 101 class? They can't even figure out default parameters, yet they're handling exceptions! A true master of crashing without even trying. |
No description provided.