Skip to content

Conversation

@kclowes
Copy link
Collaborator

@kclowes kclowes commented Oct 15, 2025

🗒️ Description

The self.data notation was erroring because self.data didn't get set if data came in as None. Removed if self.data: line so it always gets set now and is accounted for in __str__.

🔗 Related Issues or PRs

N/A

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

@kclowes kclowes force-pushed the fix/jsonrpcerror-data branch from 837ceaa to 1163c42 Compare October 15, 2025 20:06
@kclowes kclowes changed the title fix(rpc): Use hasattr instead of directly accessing self.data in JSONRPCError __str__ fix(rpc): Always set data to JSONRPCError, account for None Oct 15, 2025
@kclowes kclowes changed the title fix(rpc): Always set data to JSONRPCError, account for None fix(rpc): Always set data on JSONRPCError, account for None Oct 15, 2025
@kclowes kclowes added type:bug Something isn't working scope:types Scope: Changes to ethereum_test_types, ethereum_test_base_types labels Oct 15, 2025
@kclowes kclowes marked this pull request as ready for review October 15, 2025 20:12
Copy link
Member

@KolbyML KolbyML left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: looks good

Copy link
Collaborator

@felix314159 felix314159 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty and sorry!

@felix314159 felix314159 merged commit 87cf310 into ethereum:main Oct 15, 2025
15 checks passed
@kclowes kclowes deleted the fix/jsonrpcerror-data branch October 15, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:types Scope: Changes to ethereum_test_types, ethereum_test_base_types type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants