refactor(jd-client): robust error handling for initialization and retry logic#456
refactor(jd-client): robust error handling for initialization and retry logic#456nulllpc wants to merge 1 commit intostratum-mining:mainfrom
Conversation
90ed53b to
a541334
Compare
Shourya742
left a comment
There was a problem hiding this comment.
Overall approach looks good.
3d9b16b to
aaece78
Compare
|
Hi @Shourya742 I updated my PR accordingly, I reviewed the changes made in #467 and I think my changes still align well with changes there and the comment you made here |
Shourya742
left a comment
There was a problem hiding this comment.
Changes look okay to me. As a rule of thumb, avoid adding side effects in combinators. Once we fix this, I will approve it.
|
I addressed all comments, please review again @Shourya742 |
|
@nulllpc once you fix the clippy and fmt nits, I’ll approve. Nice work. |
|
All done! Let's get this merged, this is my first PR for sv2. Thanks for your reviews @Shourya742 |
|
@nulllpc can you squash the commits. |
7979589 to
f3c949c
Compare
|
Done! @Shourya742 I double-checked commit message as well |
f3c949c to
42587c2
Compare
|
Hi @Shourya742 can we merge this PR, are we waiting for sth? |
7fbbd5d to
105844a
Compare
panicking Replaces several `expect()` and `unwrap()` calls in `JobDeclaratorClient::start` with proper error propagation using `Result`. - Updated `start()` signature to return `JDCError<JobDeclarationClient>`. - Introduced `InitializationError(String)` variant to `JDCErrorKind` to preserve context from formerly panicking calls. - Updated `main.rs` and integration tests to handle the new `Result` type - Fix clippy and fmt checks
105844a to
7af9c03
Compare
#168
This PR attempts to improve error handling for JDC by addressing some low-hanging improvements:
expect()andunwrap()calls inJobDeclaratorClient::startwith proper error propagation usingResult.Changes:
start()signature to returnJDCError<JobDeclarationClient>.InitializationError(String)variant toJDCErrorKindto preserve context from formerly panicking calls.main.rsand integration tests to handle the newResulttypetry_initialize_singleis updated to inspect theActionfrom sub-component errors and return a fullJDCErrorwith either aShutdownorFallbackaction.initialize_jdnow checkse.action. It immediately propagates fatalShutdownerrors up tostart()while continuing to retry onFallbackerrors.Actionenum now derivesPartialEqandEqto enable this logic.JDCResulttype alias.