Skip to content

Commit c7d9158

Browse files
TennyZhuangclaude
andcommitted
fix(connector): explicit error conversion in cdc reader try-block (2026-01-19)
Same class as the rpc_client fix: newer rustc no longer auto-applies the `jni::errors::Error -> anyhow::Error` conversion at `?` inside a `try` block. Make it explicit via `.map_err(anyhow::Error::from)`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 2e8733f commit c7d9158

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/connector/src/source/cdc/source/reader.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ impl<T: CdcSourceTypeTrait> SplitReader for CdcSplitReader<T> {
113113
std::thread::spawn(move || {
114114
execute_with_jni_env(jvm, |env| {
115115
let result: anyhow::Result<_> = try {
116-
let get_event_stream_request_bytes = env.byte_array_from_slice(
117-
&Message::encode_to_vec(&get_event_stream_request),
118-
)?;
116+
let get_event_stream_request_bytes = env
117+
.byte_array_from_slice(&Message::encode_to_vec(&get_event_stream_request))
118+
.map_err(anyhow::Error::from)?;
119119
(env, get_event_stream_request_bytes)
120120
};
121121

0 commit comments

Comments
 (0)