From 2b9d2478833a060df76c855e78c46e33c032db49 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 1 Nov 2018 13:29:29 +0300 Subject: ActivityPub: fix 410 error handler --- .../src/main/java/com/juick/server/ActivityPubManager.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/ActivityPubManager.java') diff --git a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java index 692d1107..0cb76a03 100644 --- a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java +++ b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java @@ -22,6 +22,9 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.ApplicationEventPublisher; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; import org.springframework.http.client.ClientHttpResponse; import org.springframework.stereotype.Component; import org.springframework.web.client.DefaultResponseErrorHandler; @@ -317,12 +320,4 @@ public class ActivityPubManager implements ActivityListener, NotificationListene } }); } - - public static class ErrorHandler extends DefaultResponseErrorHandler { - @Override - public void handleError(ClientHttpResponse response) throws IOException { - logger.warn("HTTP ERROR {} {} : {}", response.getStatusCode().value(), - response.getStatusText(), IOUtils.toString(response.getBody(), StandardCharsets.UTF_8)); - } - } } -- cgit v1.2.3