Skip to content

Commit ec44733

Browse files
committed
logging all the errors, instead of just ErrorResponseException type
1 parent fcff4eb commit ec44733

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadAutoArchiver.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import net.dv8tion.jda.api.entities.channel.concrete.ForumChannel;
1010
import net.dv8tion.jda.api.entities.channel.concrete.ThreadChannel;
1111
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
12-
import net.dv8tion.jda.api.exceptions.ErrorResponseException;
1312
import net.dv8tion.jda.api.requests.RestAction;
1413
import net.dv8tion.jda.api.utils.Result;
1514
import net.dv8tion.jda.api.utils.TimeUtil;
@@ -148,7 +147,7 @@ private void handleArchiveFlow(ThreadChannel threadChannel, MessageEmbed embed)
148147
})
149148
.mapToResult()
150149
.flatMap(sentEmbed -> {
151-
if (sentEmbed.getFailure() instanceof ErrorResponseException) {
150+
if (sentEmbed.isFailure()) {
152151
LOGGER.warn(
153152
"Unknown error occurred during help thread auto archive routine, archiving thread",
154153
sentEmbed.getFailure());

0 commit comments

Comments
 (0)