Skip to content

small: remove Failed to parse error messages in solana indexer#580

Merged
ppca merged 2 commits intodevelopfrom
xiangyi/remove_noisy_parsing
Oct 30, 2025
Merged

small: remove Failed to parse error messages in solana indexer#580
ppca merged 2 commits intodevelopfrom
xiangyi/remove_noisy_parsing

Conversation

@ppca
Copy link
Copy Markdown
Contributor

@ppca ppca commented Oct 28, 2025

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 match to if 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.

Comment on lines +686 to 689
if let Ok(events) = parse_cpi_events(&rpc_client, &signature, &program_id).await {
for ev in events {
event_handler(ev, signature, response.context.slot);
}
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
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
);
}

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

prefer to not do this, because the Err branch simply means we did not find matching transactions, no need to report it every time.

@ppca ppca merged commit e0c6c6f into develop Oct 30, 2025
3 checks passed
@ppca ppca deleted the xiangyi/remove_noisy_parsing branch October 30, 2025 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants