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