@@ -210,9 +210,16 @@ impl AddressState {
210210 AddressStateQuery :: GetAddressUTxOs { address } => {
211211 match state. get_address_utxos ( address) . await {
212212 Ok ( Some ( utxos) ) => AddressStateQueryResponse :: AddressUTxOs ( utxos) ,
213- Ok ( None ) => AddressStateQueryResponse :: Error ( QueryError :: not_found (
214- "Address not found" ,
215- ) ) ,
213+ Ok ( None ) => match address. to_string ( ) {
214+ Ok ( addr_str) => AddressStateQueryResponse :: Error (
215+ QueryError :: not_found ( format ! ( "Address {}" , addr_str) ) ,
216+ ) ,
217+ Err ( e) => {
218+ AddressStateQueryResponse :: Error ( QueryError :: internal_error (
219+ format ! ( "Could not convert address to string: {}" , e) ,
220+ ) )
221+ }
222+ } ,
216223 Err ( e) => AddressStateQueryResponse :: Error ( QueryError :: internal_error (
217224 e. to_string ( ) ,
218225 ) ) ,
@@ -221,9 +228,16 @@ impl AddressState {
221228 AddressStateQuery :: GetAddressTransactions { address } => {
222229 match state. get_address_transactions ( address) . await {
223230 Ok ( Some ( txs) ) => AddressStateQueryResponse :: AddressTransactions ( txs) ,
224- Ok ( None ) => AddressStateQueryResponse :: Error ( QueryError :: not_found (
225- "Address not found" ,
226- ) ) ,
231+ Ok ( None ) => match address. to_string ( ) {
232+ Ok ( addr_str) => AddressStateQueryResponse :: Error (
233+ QueryError :: not_found ( format ! ( "Address {}" , addr_str) ) ,
234+ ) ,
235+ Err ( e) => {
236+ AddressStateQueryResponse :: Error ( QueryError :: internal_error (
237+ format ! ( "Could not convert address to string: {}" , e) ,
238+ ) )
239+ }
240+ } ,
227241 Err ( e) => AddressStateQueryResponse :: Error ( QueryError :: internal_error (
228242 e. to_string ( ) ,
229243 ) ) ,
0 commit comments