File tree 1 file changed +5
-6
lines changed
crates/interledger-api/src/routes
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -454,18 +454,16 @@ where
454
454
. and ( warp:: path:: end ( ) )
455
455
. and ( with_store. clone ( ) )
456
456
. and_then ( move |id : Uuid , tracking_info : String , store : S | {
457
-
458
457
let server_secret_clone = server_secret_clone. clone ( ) ;
459
458
async move {
460
459
let accounts = store. get_accounts ( vec ! [ id] ) . await ?;
461
460
// TODO return the response without instantiating an SpspResponder (use a simple fn)
462
461
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) {
466
464
Ok ( addr) => {
467
465
trace ! (
468
- account_id= %id,
466
+ account_id = %id,
469
467
"Appended tracking info: {}" ,
470
468
addr,
471
469
) ;
@@ -475,7 +473,8 @@ where
475
473
)
476
474
}
477
475
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) ;
479
478
// TODO give a different error message depending on what type of error it is
480
479
Err ( Rejection :: from (
481
480
ApiError :: internal_server_error ( ) . detail ( msg) ,
You can’t perform that action at this time.
0 commit comments