Skip to content
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

Error Enum with thiserror support that uses error(message) instead #14332

Conversation

Cyber-Mitch
Copy link
Contributor

πŸ”§ Refactored L1BlockInfoError for Better Error Handling

❌ Problem

OpBlockExecutionError::L1BlockInfoError used string-based messages, making errors hard to structure, debug, and maintain.

βœ… Solution

Replaced string-based errors with a structured L1BlockInfoError enum using thiserror.

πŸ”„ Changes

βœ”οΈ Introduced L1BlockInfoError enum
βœ”οΈ Updated OpBlockExecutionError to use the new enum
βœ”οΈ Refactored key functions like (extract_l1_info, parse_l1_info_tx_*)

@mattsse

@Cyber-Mitch Cyber-Mitch changed the title Error Enum with thiserror support that uses error(message) instead #14310 Error Enum with thiserror support that uses error(message) instead Feb 8, 2025
@Cyber-Mitch
Copy link
Contributor Author

@mattsse I've made the changes you requested earlier for the previous PR

@emhane
Copy link
Member

emhane commented Feb 8, 2025

duplicate of #14326

@emhane emhane added the A-op-reth Related to Optimism and op-reth label Feb 8, 2025
@Cyber-Mitch
Copy link
Contributor Author

duplicate of #14326

Would it still be possible for my PR to be merged?

@emhane emhane added the S-duplicate This issue or PR already exists label Feb 8, 2025
@emhane
Copy link
Member

emhane commented Feb 8, 2025

duplicate of #14326

Would it still be possible for my PR to be merged?

simply depends which pr can be approved first

@Cyber-Mitch
Copy link
Contributor Author

duplicate of #14326

Would it still be possible for my PR to be merged?

simply depends which pr can be approved first

Okay

@emhane
Copy link
Member

emhane commented Feb 9, 2025

superseded by #14326

@emhane emhane closed this Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth S-duplicate This issue or PR already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants