mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 04:57:11 +00:00
[BUG] Fix #22351 by updating exceptions.mustache to log both the response data and response body, when applicable (#22352)
* Update exceptions.mustache * Add autogen files
This commit is contained in:
@@ -170,8 +170,11 @@ class ApiException(OpenApiException):
|
||||
error_message += "HTTP response headers: {0}\n".format(
|
||||
self.headers)
|
||||
|
||||
if self.data or self.body:
|
||||
error_message += "HTTP response body: {0}\n".format(self.data or self.body)
|
||||
if self.body:
|
||||
error_message += "HTTP response body: {0}\n".format(self.body)
|
||||
|
||||
if self.data:
|
||||
error_message += "HTTP response data: {0}\n".format(self.data)
|
||||
|
||||
return error_message
|
||||
|
||||
|
||||
Reference in New Issue
Block a user