Interface WebhookErrorHandler
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface WebhookErrorHandler
Used to dynamically handle errors for webhook requests inWebhookClient
If not explicitly configured, this usesDEFAULT.
-
-
Field Summary
Fields Modifier and Type Field Description static WebhookErrorHandlerDEFAULTThe default error handling which simply logs the exception using SLF4J
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandle(@NotNull WebhookClient client, @NotNull String message, @Nullable Throwable throwable)Implements error handling, must not throw anything!
-
-
-
Field Detail
-
DEFAULT
static final WebhookErrorHandler DEFAULT
The default error handling which simply logs the exception using SLF4J
-
-
Method Detail
-
handle
void handle(@NotNull @NotNull WebhookClient client, @NotNull @NotNull String message, @Nullable @Nullable Throwable throwable)Implements error handling, must not throw anything!- Parameters:
client- TheWebhookClientinstance which encountered the exceptionmessage- The context message used for loggingthrowable- The encountered exception, or null if the error is only a context message
-
-