Skip to content

Commit d64d453

Browse files
authored
Update exceptions.mustache
1 parent fd72d4d commit d64d453

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

modules/openapi-generator/src/main/resources/python/exceptions.mustache

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ class ApiException(OpenApiException):
160160
error_message += "HTTP response headers: {0}\n".format(
161161
self.headers)
162162

163-
if self.data or self.body:
164-
error_message += "HTTP response body: {0}\n".format(self.data or self.body)
163+
if self.body:
164+
error_message += "HTTP response body: {0}\n".format(self.body)
165+
166+
if self.data:
167+
error_message += "HTTP response data: {0}\n".format(self.data)
165168

166169
return error_message
167170

0 commit comments

Comments
 (0)