1 namespace org { namespace ldk { namespace enums {/**
2 * This enum is used to specify which error data to send to peers when failing back an HTLC
3 * using [`ChannelManager::fail_htlc_backwards_with_reason`].
5 * For more info on failure codes, see <https://github.com/lightning/bolts/blob/master/04-onion-routing.md#failure-messages>.
7 public enum FailureCode {
9 * We had a temporary error processing the payment. Useful if no other error codes fit
10 * and you want to indicate that the payer may want to retry.
12 LDKFailureCode_TemporaryNodeFailure,
14 * We have a required feature which was not in this onion. For example, you may require
15 * some additional metadata that was not provided with this payment.
17 LDKFailureCode_RequiredNodeFeatureMissing,
19 * You may wish to use this when a `payment_preimage` is unknown, or the CLTV expiry of
20 * the HTLC is too close to the current block height for safe handling.
21 * Using this failure code in [`ChannelManager::fail_htlc_backwards_with_reason`] is
22 * equivalent to calling [`ChannelManager::fail_htlc_backwards`].
24 LDKFailureCode_IncorrectOrUnknownPaymentDetails,