Skip to content

Commit 699372e

Browse files
Frans SaukkoKristianWahlroos
Frans Saukko
authored andcommitted
fix(spsp_routes): fix formatting suggestion changes
Signed-off-by: Kristian Wahlroos <[email protected]>
1 parent 00715d3 commit 699372e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

crates/interledger-api/src/routes/accounts.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -454,18 +454,16 @@ where
454454
.and(warp::path::end())
455455
.and(with_store.clone())
456456
.and_then(move |id: Uuid, tracking_info: String, store: S| {
457-
458457
let server_secret_clone = server_secret_clone.clone();
459458
async move {
460459
let accounts = store.get_accounts(vec![id]).await?;
461460
// TODO return the response without instantiating an SpspResponder (use a simple fn)
462461

463-
let combined = format!("{}.{}", accounts[0].ilp_address(), tracking_info);
464-
match Address::from_str(&combined)
465-
{
462+
let with_tracking = format!("{}.{}", accounts[0].ilp_address(), tracking_info);
463+
match Address::from_str(&with_tracking) {
466464
Ok(addr) => {
467465
trace!(
468-
account_id=%id,
466+
account_id = %id,
469467
"Appended tracking info: {}",
470468
addr,
471469
);
@@ -475,7 +473,8 @@ where
475473
)
476474
}
477475
Err(err) => {
478-
error!(?combined, "Appending tracking information produced an invalid address: {}", err);
476+
let msg = format!("Error appending tracking info: {}", err);
477+
error!(address_with_tracking = ?with_tracking, "{}", msg);
479478
// TODO give a different error message depending on what type of error it is
480479
Err(Rejection::from(
481480
ApiError::internal_server_error().detail(msg),

0 commit comments

Comments
 (0)