aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-01 11:45:51 +0300
committerGravatar Vitaly Takmazov2018-11-01 11:45:51 +0300
commit41b0b0b1f695830681ef8f57f0974c022de241c1 (patch)
tree8e2880cbd35039aef46a85834c462cab8a64f363 /juick-server/src/main/java/com/juick/server/configuration
parentb835d8b7e5f4a39a5d4d38f42ae260720babc7b8 (diff)
custom http error handler
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/configuration')
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java b/juick-server/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
index b7762221..37afc1d8 100644
--- a/juick-server/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
+++ b/juick-server/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
@@ -1,5 +1,6 @@
package com.juick.server.configuration;
+import com.juick.server.ActivityPubManager;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.cache.CacheConfig;
import org.apache.http.impl.client.cache.CachingHttpClientBuilder;
@@ -18,6 +19,7 @@ public class ActivityPubClientConfig {
RestTemplate restTemplate = new RestTemplate(requestFactory);
// BufferingClientHttpRequestFactory allows us to read the response more than once - Necessary for debugging.
restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory(httpClient())));
+ restTemplate.setErrorHandler(new ActivityPubManager.ErrorHandler());
return restTemplate;
}
@Bean