Skip to content

Commit

Permalink
SchemaFetchError -> SinkError::Config
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjinwu committed Jan 16, 2024
1 parent de10736 commit 54e0b8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/connector/src/sink/formatter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl SinkFormatterImpl {
let descriptor =
crate::schema::protobuf::fetch_descriptor(&format_desc.options, None)
.await
.map_err(|e| SinkError::Config(anyhow!("{e:?}")))?;
.map_err(|e| SinkError::Config(anyhow!(e)))?;
let val_encoder = ProtoEncoder::new(schema, None, descriptor)?;
let formatter = AppendOnlyFormatter::new(key_encoder, val_encoder);
Ok(SinkFormatterImpl::AppendOnlyProto(formatter))
Expand Down Expand Up @@ -240,7 +240,7 @@ impl SinkFormatterImpl {
let (key_schema, val_schema) =
crate::schema::avro::fetch_schema(&format_desc.options, topic)
.await
.map_err(|e| SinkError::Config(anyhow!("{e:?}")))?;
.map_err(|e| SinkError::Config(anyhow!(e)))?;
let key_encoder = AvroEncoder::new(
schema.clone(),
Some(pk_indices),
Expand Down

0 comments on commit 54e0b8f

Please sign in to comment.