Closed MRLab12 closed 5 months ago
Hey @MRLab12 , I got your message over the weekend. I apologize that I wasn't quick enough to push my WIP branch and open a PR before I could answer you. Thankfully I don't think you did too much repetitive work there but if you'd like to contribute here I'm all for it. Otherwise I will try to hop in here and wrap it up this week. Thanks for the nudge and the contribution!
Hey @MRLab12 , I got your message over the weekend. I apologize that I wasn't quick enough to push my WIP branch and open a PR before I could answer you. Thankfully I don't think you did too much repetitive work here but if you'd like to contribute there (#3300) I'm all for it. Otherwise I will try to wrap it up this week. Thanks for the nudge and the contribution!
@fselmo Thank you for the reply! Yeah no worries, I intended for this PR to be an initial step to discuss potential changes that needed to happen. I can see from your branch that you are already further into the works that needs to be done. Looks like you got it handled, but I'm happy to help with anything if you need it. I want to contribute more to web3.py
so looking for issues I can take on.
What was wrong?
The issue was identified in the RequestManager class of the Web3.py library, where error responses were not being handled as expected, leading to ambiguity in error handling. The exception
ValueError
is making it difficult for developers to understand the context and use case of the error they are currently getting.Related to Issue #3241
How was it fixed?
Added the
Web3ValueError
exception class to explicitly represent errors related to invalid values within the Web3.py context. This class enhances the granularity of error handling by distinctly addressing value-related issues.Integrated the
Web3ValueError
within theformatted_response
method of theRequestManager
. Now, whenformatted_response
encounters an error condition indicative of a value issue, it raisesWeb3ValueError
, thereby providing a more specific and meaningful error to the developer.Todo:
Cute Animal Picture
![Put a link to a cute animal picture inside the parenthesis-->]()