Skip to content

Commit d55aea1

Browse files
Debarshi GuptaDebarshi Gupta
authored andcommitted
chore: Resolved PR comments
1 parent 387e6ae commit d55aea1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/router/src/connector/authorizedotnet/transformers.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@ impl ForeignTryFrom<Value> for Vec<UserField> {
321321
type Error = error_stack::Report<errors::ConnectorError>;
322322
fn foreign_try_from(metadata: Value) -> Result<Self, Self::Error> {
323323
let hashmap: BTreeMap<String, Value> = serde_json::from_str(&metadata.to_string())
324-
.change_context(errors::ConnectorError::ResponseDeserializationFailed)
324+
.change_context(errors::ConnectorError::RequestEncodingFailedWithReason(
325+
"Failed to serialize request metadata".to_owned(),
326+
))
325327
.attach_printable("")?;
326328
let mut vector: Self = Self::new();
327329
for (key, value) in hashmap {

0 commit comments

Comments
 (0)