KTOR-9183 Forward original CancellationException in attachToUserJob#5581
KTOR-9183 Forward original CancellationException in attachToUserJob#5581osipxd merged 2 commits intoktorio:mainfrom
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR improves how ChangesCancellation Exception Subtype Preservation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
osipxd
left a comment
There was a problem hiding this comment.
Thank you for the PR! Overall it looks good I only have a couple of stylistic comments
|
Thanks for the feedback! Fixed it! |
|
Nicely done! 🏆 |
Subsystem
Client / Core
Motivation
KTOR-9183 —
attachToUserJob's cleanup handler substitutes a genericCancellationExceptionfor the user job's cause, droppingTimeoutCancellationException. As a resultwithTimeout/withTimeoutOrNullwrapping a client call no longer recognises its own timeout.Solution
Forward the original
CancellationException(including subtypes) when the cause already is one; wrap intoCancellationException(message)only for non-cancellation throwables.