We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d680eb2 commit 2c00767Copy full SHA for 2c00767
crates/router/src/connector/paypal.rs
@@ -190,10 +190,13 @@ impl ConnectorCommon for Paypal {
190
})
191
192
.transpose()?;
193
- let reason = error_reason
194
- .unwrap_or(response.message.to_owned())
195
- .is_empty()
196
- .then_some(response.message.to_owned());
+ let reason = match error_reason {
+ Some(err_reason) => err_reason
+ .is_empty()
+ .then(|| response.message.to_owned())
197
+ .or(Some(err_reason)),
198
+ None => Some(response.message.to_owned()),
199
+ };
200
201
Ok(ErrorResponse {
202
status_code: res.status_code,
0 commit comments