File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -681,7 +681,7 @@ async fn main() {
681681 } ) ,
682682 ( Some ( _) , Some ( _) ) => {
683683 handle_error ( LdkServerError :: new (
684- InternalError ,
684+ InvalidRequestError ,
685685 "Only one of description or description_hash can be set." . to_string ( ) ,
686686 ) ) ;
687687 } ,
@@ -1250,7 +1250,7 @@ fn parse_bolt11_invoice_description(
12501250 } ) ,
12511251 ( Some ( _) , Some ( _) ) => {
12521252 handle_error ( LdkServerError :: new (
1253- InternalError ,
1253+ InvalidRequestError ,
12541254 "Only one of description or description_hash can be set." . to_string ( ) ,
12551255 ) ) ;
12561256 } ,
@@ -1262,13 +1262,13 @@ fn parse_page_token(token_str: &str) -> Result<PageToken, LdkServerError> {
12621262 let parts: Vec < & str > = token_str. split ( ':' ) . collect ( ) ;
12631263 if parts. len ( ) != 2 {
12641264 return Err ( LdkServerError :: new (
1265- InternalError ,
1265+ InvalidRequestError ,
12661266 "Page token must be in format 'token:index'" . to_string ( ) ,
12671267 ) ) ;
12681268 }
1269- let index = parts[ 1 ]
1270- . parse :: < i64 > ( )
1271- . map_err ( |_| LdkServerError :: new ( InternalError , "Invalid page token index" . to_string ( ) ) ) ?;
1269+ let index = parts[ 1 ] . parse :: < i64 > ( ) . map_err ( |_| {
1270+ LdkServerError :: new ( InvalidRequestError , "Invalid page token index" . to_string ( ) )
1271+ } ) ?;
12721272 Ok ( PageToken { token : parts[ 0 ] . to_string ( ) , index } )
12731273}
12741274
You can’t perform that action at this time.
0 commit comments