Skip to content

Fix: Indexer logs file read errors instead of swallowing them#9

Open
echobt wants to merge 1 commit intomainfrom
fix/issue-47-indexer-log-errors-v2
Open

Fix: Indexer logs file read errors instead of swallowing them#9
echobt wants to merge 1 commit intomainfrom
fix/issue-47-indexer-log-errors-v2

Conversation

@echobt
Copy link
Copy Markdown
Contributor

@echobt echobt commented Jan 19, 2026

Summary

Modified the indexer to log specific file read errors instead of silently incrementing the 'skipped' counter.

Problem

Previously, when the indexer encountered an error reading a file (e.g., permission denied, invalid UTF-8), it caught the error generically with Err(_) => skipped += 1, giving the user no indication of why files were skipped or which files failed.

Solution

Updated the match block in both Indexer and ServerIndexer to capture the error Err(e) and print a warning message with the file path and error details using pb.println. This ensures the progress bar display remains intact while informing the user of issues.

Testing

Confirmed via code analysis that the Err(_) arm was swallowing errors. The fix now explicitly logs Failed to read file {path}: {error} to the console.

Related Issue

Fixes PlatformNetwork/bounty-challenge#47

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.

[BUG] Indexer silently swallows file errors and reports them as "skipped"

2 participants