-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
TypeError: Cannot use 'in' operator to search for 'originalError' in null #6433
Comments
@lvivo639 Thanks for details, we will fix this. |
The in operator looks for the key in an object, but unfortunately null is also an object, which means |
@Alfxjx sure open PR for its fix, thanks |
Alfxjx
added a commit
to Alfxjx/web3.js
that referenced
this issue
Mar 16, 2024
17 tasks
jdevcs
added a commit
that referenced
this issue
Jul 11, 2024
* fix(web3-errors): handle the undefined data in Eip838ExecutionError constructor(#6433) * doc: update changelog * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Muhammad Altabba <[email protected]> Co-authored-by: Junaid <[email protected]>
17 tasks
jdevcs
added a commit
that referenced
this issue
Jul 12, 2024
…7147) * fix(web3-errors): the undefined data in Eip838ExecutionError (#6905) * fix(web3-errors): handle the undefined data in Eip838ExecutionError constructor(#6433) * doc: update changelog * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Muhammad Altabba <[email protected]> Co-authored-by: Junaid <[email protected]> * changelog update --------- Co-authored-by: Xu Jianxiang <[email protected]> Co-authored-by: Muhammad Altabba <[email protected]> Co-authored-by: Oleksii Kosynskyi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Throwing error with message that my transaction/gas estimating was reverted
Actual behavior
\web3-errors\src\errors\contract_errors.ts:163 line throws next error:
It can be thrown by web3.eth..estimateGas() or w3.eth.sendSignedTransaction().
My transaction was reverted and I just logged it in console (in library code) to understand what happened. Error object is:
As soon as
typeof null === 'object'
is true web3-errors library throws an error above in this code:Error throwed in
web3-errors\src\errors\contract_errors.ts:163
Steps to reproduce the behavior
I don't actually know why transaction is reverted. Code throws it randomly.
Logs
Environment
npm - 9.8.1
node - 18.17.1
web3 - 4.1.1
OS - Windows 10
The text was updated successfully, but these errors were encountered: