Add documentation about PaymentSent/Failed event duplication bug
[rust-lightning] / src / util / errors.rs
index f9c7f7111951fa8200c558c59dcdbdcbf13f480b..6513beefe794e82f9651e61b55739a5f7d8b651a 100644 (file)
@@ -26,6 +26,14 @@ pub enum APIError {
                /// A human-readable error message
                err: &'static str
        },
+
+
+       /// We were unable to complete the request since channel is disconnected or
+       /// shutdown in progress initiated by remote
+       ChannelUnavailable {
+               /// A human-readable error message
+               err: &'static str
+       }
 }
 
 impl fmt::Debug for APIError {
@@ -34,6 +42,7 @@ impl fmt::Debug for APIError {
                        APIError::APIMisuseError {ref err} => f.write_str(err),
                        APIError::FeeRateTooHigh {ref err, ref feerate} => write!(f, "{} feerate: {}", err, feerate),
                        APIError::RouteError {ref err} => f.write_str(err),
+                       APIError::ChannelUnavailable {ref err} => f.write_str(err),
                }
        }
 }