feat(node/service): Propagated errors raised during NodeActor::start#2322
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the error propagation mechanism in the NodeActor::start flow by explicitly returning error values from asynchronous tasks.
- Explicitly returns error values from the error branches in util.rs
- Updates the start method signature in core.rs to return a Result, propagating error messages
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/node/service/src/service/util.rs | Adds explicit error returns in error branches within the macro |
| crates/node/service/src/service/core.rs | Modifies the start method signature and propagates errors via a Result |
Comments suppressed due to low confidence (1)
crates/node/service/src/service/util.rs:34
- Ensure that the error returned in the first branch (line 34) is converted to a String to maintain consistency with the start method signature in core.rs, which expects a Result<(), String>.
return Err(e);
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
theochap
left a comment
There was a problem hiding this comment.
Good start! I will approve this one. As a follow-up it would be great to have a more structured error type to return from start. Potentially an enum we can macro-generate from the actor's list or a dyn Box<...> error type.
Fixes #2311