diff options
author | 2018-11-01 13:29:29 +0300 | |
---|---|---|
committer | 2018-11-01 13:29:29 +0300 | |
commit | 2b9d2478833a060df76c855e78c46e33c032db49 (patch) | |
tree | a516cb597704529cf1de623eb807d219a5510d49 /juick-server/src/main/java/com/juick/server/ActivityPubManager.java | |
parent | 0dc2727e0633a4b865d814c7ab8450e3c815e511 (diff) |
ActivityPub: fix 410 error handler
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/ActivityPubManager.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/ActivityPubManager.java | 11 |
1 files changed, 3 insertions, 8 deletions
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)); - } - } } |