aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/config/ActivityPubClientErrorHandler.java7
-rw-r--r--src/main/java/com/juick/www/api/webfinger/Resource.java3
2 files changed, 6 insertions, 4 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;
diff --git a/src/main/java/com/juick/www/api/webfinger/Resource.java b/src/main/java/com/juick/www/api/webfinger/Resource.java
index 3a6c36c4..4b2bc388 100644
--- a/src/main/java/com/juick/www/api/webfinger/Resource.java
+++ b/src/main/java/com/juick/www/api/webfinger/Resource.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2022, Juick
+ * Copyright (C) 2008-2023, Juick
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -18,7 +18,6 @@
package com.juick.www.api.webfinger;
import com.juick.model.User;
-import com.juick.www.api.activity.model.Context;
import com.juick.www.api.webfinger.model.Account;
import com.juick.www.api.webfinger.model.Link;
import com.juick.util.HttpNotFoundException;