-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnsupportedOperationException in LogbookHttpRequestInterceptor with Spring Boot 3.2.0 and Apache Http Client 5 #1693
Comments
I think that good workaround for this would be putting everything in LogbookHttpRequestInterceptor.process method with try catch and ignore this error. |
I mean something like that: try {
LocalRequest request = new LocalRequest(httpRequest, entity);
final ResponseProcessingStage stage = logbook.process(request).write();
context.setAttribute(Attributes.STAGE, stage);
} catch (HttpException | IOException exception) {
throw exception;
} catch (Exception ignored) {
}
} |
Thank you for reporting @marcindabrowski, I believe the fix from #1701 should address the root cause here. I'll be part of 3.7.0. I'll close the issue so that it gets to the release log, bug feel free to re-open it, if it's not fully addressed. |
OK @kasmarian. Thanks for the fix. But I think that you should reconsider how your interceptors are working. And I'm not sure if your fix will work. |
I also had this concern at first, but as Logbook copies the entity and then sets it back in the original Request or Response, As per wrapping all interceptors in |
I've created new feature request: #1702 |
Description
After upgrade to Spring Boot 3.2.0 (Spring Framework 6.1.1) I'm getting this exception:
This is because
HttpComponentsClientHttpRequest
has been reworked in Spring Framework 6.1.Expected Behavior
Zalando request interceptor shouldn't fail when there is no body to intercept.
But I think some more work should be done, because with previous version of Spring Framework it was working.
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: