aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/config')
-rw-r--r--src/main/java/com/juick/config/ActivityPubClientErrorHandler.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/juick/config/ActivityPubClientErrorHandler.java b/src/main/java/com/juick/config/ActivityPubClientErrorHandler.java
index c6e59768..f230d3d7 100644
--- a/src/main/java/com/juick/config/ActivityPubClientErrorHandler.java
+++ b/src/main/java/com/juick/config/ActivityPubClientErrorHandler.java
@@ -43,12 +43,15 @@ public class ActivityPubClientErrorHandler implements Interceptor {
var response = chain.proceed(request);
var url = request.url();
if (!response.isSuccessful()) {
+ var code = response.code();
+ var body = response.body() != null ? response.body().string() : "";
if (response.code() == HttpStatus.GONE.value()) {
logger.debug("Server report {} is gone, deleting", url);
applicationEventPublisher.publishEvent(new DeleteUserEvent(this, url.toString()));
+ } else if (response.code() == HttpStatus.NOT_FOUND.value()) {
+ logger.debug("HTTP ERROR {} on {} : {}", code, url, body);
} else {
- logger.warn("HTTP ERROR {} on {} : {}", response.code(),
- url, response.body() != null ? response.body().string() : "");
+ logger.warn("HTTP ERROR {} on {} : {}", code, url, body);
}
}
return response;