File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ enum NodeError {
134
134
"OnchainTxCreationFailed",
135
135
"ConnectionFailed",
136
136
"InvoiceCreationFailed",
137
+ "InvoiceRequestCreationFailed",
137
138
"OfferCreationFailed",
138
139
"PaymentSendingFailed",
139
140
"ProbeSendingFailed",
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ pub enum Error {
13
13
ConnectionFailed ,
14
14
/// Invoice creation failed.
15
15
InvoiceCreationFailed ,
16
+ /// Invoice request creation failed.
17
+ InvoiceRequestCreationFailed ,
16
18
/// Offer creation failed.
17
19
OfferCreationFailed ,
18
20
/// Sending a payment has failed.
@@ -91,6 +93,7 @@ impl fmt::Display for Error {
91
93
} ,
92
94
Self :: ConnectionFailed => write ! ( f, "Network connection closed." ) ,
93
95
Self :: InvoiceCreationFailed => write ! ( f, "Failed to create invoice." ) ,
96
+ Self :: InvoiceRequestCreationFailed => write ! ( f, "Failed to create invoice request." ) ,
94
97
Self :: OfferCreationFailed => write ! ( f, "Failed to create offer." ) ,
95
98
Self :: PaymentSendingFailed => write ! ( f, "Failed to send the given payment." ) ,
96
99
Self :: ProbeSendingFailed => write ! ( f, "Failed to send the given payment probe." ) ,
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ impl Bolt12Payment {
105
105
Ok ( payment_id)
106
106
} ,
107
107
Err ( e) => {
108
- log_error ! ( self . logger, "Failed to send payment : {:?}" , e) ;
108
+ log_error ! ( self . logger, "Failed to send invoice request : {:?}" , e) ;
109
109
match e {
110
110
Bolt12SemanticError :: DuplicatePaymentId => Err ( Error :: DuplicatePayment ) ,
111
111
_ => {
@@ -123,7 +123,7 @@ impl Bolt12Payment {
123
123
status : PaymentStatus :: Failed ,
124
124
} ;
125
125
self . payment_store . insert ( payment) ?;
126
- Err ( Error :: PaymentSendingFailed )
126
+ Err ( Error :: InvoiceRequestCreationFailed )
127
127
} ,
128
128
}
129
129
} ,
You can’t perform that action at this time.
0 commit comments