-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
Bug Report Checklist
Description
When upgrading from 7.1.0 to 7.2.0 we are encountering that the change made in #17375 has ensured that the HttpServerException is no longer thrown in generated api clients.
This was used in our code to wrap the error with a better message for the client, while also logging it.
This change has caused that exception to not be thrown, but a RestClientException is thrown instead, which is now unhandled.
was this an intentional change that should be reflected in our codebase, or unintended behaviour?
openapi-generator version
7.2.0, regression from 7.1.0
Generation Details
generator version 7.2.0, installed using the gradle plguin
org.openapitools:openapi-generator-gradle-plugin:7.2.0
generation is done with library = resttemplate.
Steps to reproduce
Using generator version 7.1.0, generate a client using the resttemplate library.
Make an unsuccessful call (500 response) using htis client, while having it wrapped in a try-catch clause for org.springframework.web.client.HttpServerErrorException
This should work, and the catch part should be hit.
Now, upgrade to 7.2.0 and it should not work.
Related issues/PRs
Suggest a fix
Continue throwing the HttpServerException, or confirm that our use case was incorrect all along.