small: remove Failed to parse error messages in solana indexer#580
small: remove Failed to parse error messages in solana indexer#580
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes error logging for failed transaction parsing in the Solana indexer. The change replaces a match statement with an if let pattern, silently ignoring parse failures instead of logging them.
Key Changes:
- Simplified error handling by converting
matchtoif let Ok(...) - Removed the error logging statement for failed transaction parsing
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if let Ok(events) = parse_cpi_events(&rpc_client, &signature, &program_id).await { | ||
| for ev in events { | ||
| event_handler(ev, signature, response.context.slot); | ||
| } |
There was a problem hiding this comment.
Silently ignoring parse errors reduces observability and makes debugging difficult. The parse_cpi_events function already logs warnings for specific deserialization failures, but higher-level errors (like RPC failures or transaction fetch errors) would now be completely invisible. Consider at least logging parse failures at debug or trace level to maintain visibility into indexer health without polluting error logs.
| if let Ok(events) = parse_cpi_events(&rpc_client, &signature, &program_id).await { | |
| for ev in events { | |
| event_handler(ev, signature, response.context.slot); | |
| } | |
| match parse_cpi_events(&rpc_client, &signature, &program_id).await { | |
| Ok(events) => { | |
| for ev in events { | |
| event_handler(ev, signature, response.context.slot); | |
| } | |
| } | |
| Err(e) => { | |
| tracing::debug!( | |
| "Failed to parse CPI events for signature {}: {:?}", | |
| signature, | |
| e | |
| ); | |
| } |
There was a problem hiding this comment.
prefer to not do this, because the Err branch simply means we did not find matching transactions, no need to report it every time.
No description provided.