Compare commits

...

4 Commits

Author SHA1 Message Date
Mike Hansen
4c15a9650b Merge pull request #17 from Telecominfraproject/add-http-client-exception-to-tip-error-handler
add basePackes property back to CommonControllerAdvice. Add HttpClien…
2021-06-15 10:22:20 -04:00
Thomas Currie
5c3bf48780 add basePackes property back to CommonControllerAdvice. Add HttpClientErrorException to ExceptionPropogatingErrorHandler. 2021-06-14 18:16:21 -04:00
Mike Hansen
be09681087 Merge pull request #16 from Telecominfraproject/revert-15-WIFI-2633-Change-scope-of-CommonControllerAdvice
Revert "WIFI-2633  Change scope of CommonControllerAdvice"
2021-06-14 17:08:32 -04:00
Mike Hansen
a7076e523b Revert "WIFI-2633 Change scope of CommonControllerAdvice" 2021-06-14 17:04:37 -04:00

View File

@@ -8,6 +8,7 @@ import org.springframework.core.task.TaskRejectedException;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.HttpServerErrorException;
import org.springframework.web.client.ResponseErrorHandler;
@@ -38,7 +39,7 @@ public class ExceptionPropagatingErrorHandler extends DefaultResponseErrorHandle
public void handleError(ClientHttpResponse response) throws IOException {
try {
super.handleError(response);
} catch (HttpServerErrorException e) {
} catch (HttpServerErrorException | HttpClientErrorException e) {
// look in the response object, and if it contains any of the
// exceptions we recognize - throw that exception instead of the
// HttpServerErrorException