propage exception in example code (#8738)

* example code for BAEL-3749

* added live test

* added live test

* improved exception handling in response log filter

* propage exception in example code

* updated repo with upstream
This commit is contained in:
Seun Matt 2020-02-16 23:07:46 +01:00 committed by GitHub
parent 9d124009b0
commit f33e9961a1
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import static org.springframework.cloud.netflix.zuul.filters.support.FilterConstants.POST_TYPE;
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
@Component
public class ResponseLogFilter extends ZuulFilter {
@ -50,7 +51,7 @@ public class ResponseLogFilter extends ZuulFilter {
context.setResponseBody(responseData);
}
catch (Exception e) {
logger.error("error occurred at response log filter", e);
throw new ZuulException(e, INTERNAL_SERVER_ERROR.value(), e.getMessage());
}
return null;