Skip to content

Commit 9cbe51e

Browse files
committed
fix(detailedresponse): Check if it is a json
1 parent 237e1f7 commit 9cbe51e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

watson_developer_cloud/watson_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def get_headers(self):
157157
def _to_dict(self):
158158
_dict = {}
159159
if hasattr(self, 'result') and self.result is not None:
160-
_dict['result'] = self.result
160+
_dict['result'] = self.result if isinstance(self.result, dict) else 'Http response object'
161161
if hasattr(self, 'headers') and self.headers is not None:
162162
_dict['headers'] = self.headers
163163
return _dict

0 commit comments

Comments
 (0)