File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
crates/interledger-api/src/routes Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -454,28 +454,28 @@ where
454454 . and ( warp:: path:: end ( ) )
455455 . and ( with_store. clone ( ) )
456456 . and_then ( move |id : Uuid , tracking_info : String , store : S | {
457- trace ! ( "Tracking info: {:?}" , tracking_info) ;
458457
459458 let server_secret_clone = server_secret_clone. clone ( ) ;
460459 async move {
461460 let accounts = store. get_accounts ( vec ! [ id] ) . await ?;
462461 // TODO return the response without instantiating an SpspResponder (use a simple fn)
463462
464- match Address :: from_str ( & format ! ( "{}.{}" , accounts[ 0 ] . ilp_address( ) , tracking_info) )
463+ let combined = format ! ( "{}.{}" , accounts[ 0 ] . ilp_address( ) , tracking_info) ;
464+ match Address :: from_str ( & combined)
465465 {
466466 Ok ( addr) => {
467467 trace ! (
468- "merged: {}" ,
469- format!( "{}.{}" , accounts[ 0 ] . ilp_address( ) , tracking_info)
468+ account_id=%id,
469+ "Appended tracking info: {}" ,
470+ addr,
470471 ) ;
471472 Ok :: < _ , Rejection > (
472473 SpspResponder :: new ( addr, server_secret_clone. clone ( ) )
473474 . generate_http_response ( ) ,
474475 )
475476 }
476477 Err ( err) => {
477- let msg = format ! ( "Error sending SPSP payment: {}" , err) ;
478- error ! ( "{}" , msg) ;
478+ error ! ( ?combined, "Appending tracking information produced an invalid address: {}" , err) ;
479479 // TODO give a different error message depending on what type of error it is
480480 Err ( Rejection :: from (
481481 ApiError :: internal_server_error ( ) . detail ( msg) ,
You can’t perform that action at this time.
0 commit comments