Skip to content

Add file-path context to snapshot error messages in SnapshotRequestor #177

@coderabbitai

Description

@coderabbitai

Description

The YAML parsing error handling in SnapshotRequestor::try_load and SnapshotRequestor::save methods currently collapses errors into io::ErrorKind::Other without including the file path, making debugging harder.

Location

  • File: chain/rpc/src/client.rs
  • Lines: around 659-661 (try_load) and 720-721 (save)

Current Behavior

When YAML parsing fails, the error message doesn't include which file caused the problem (self.file).

Expected Behavior

Error messages should include the file path and original error details to aid debugging.

References

Context

This aligns with the coding guideline: "Always provide error context in error handling code."

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions