Implement WireframeError error integration (#513)#528
Conversation
Implement `std::error::Error` for `WireframeError` so the default public error type can participate in standard error handling. Preserve transport and codec sources, and keep protocol variants source-free on stable Rust because the requested blanket-plus-unit specialization conflicts under coherence rules. Use thiserror's transparent `#[from]` conversion in `TestError` now that `WireframeError<()>` implements `Error`.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideIntegrates WireframeError with std::error::Error in a coherence-safe way, exposes only IO and codec errors as sources, and simplifies TestError by using thiserror’s transparent #[from] conversion, with tests updated to cover the new Error behavior for WireframeError and WireframeError<()> specifically. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary
This branch implements standard error integration for
WireframeErrorin support of issue #513. It makes the default public error type usable throughstd::error::Error, preserves source chaining for transport and codec failures, and letsTestErroruse thiserror's transparent#[from]conversion.Closes #513.
Review walkthrough
std::error::Errorimplementation and source chaining behaviour.TestError::Wireframeconversion.WireframeError<()>sources.Validation
make check-fmt: passedmake lint: passedmake test: passedcoderabbit review --agent: passed with zero findings after one rate-limit retryNotes
The originally suggested blanket
Display/Errorimplementation plus a separateWireframeError<()>specialisation conflicts under Rust's coherence rules because upstream crates may add future trait implementations for(). This branch therefore uses a stable-compatibleErrorimplementation forWireframeError<E>whereE: Debug + 'static;source()exposes the nestedIoandCodecerrors that are always known to implementError.Summary by Sourcery
Integrate WireframeError with the standard error trait and tighten how error sources are exposed.
New Features:
Enhancements:
Tests: