Skip to content

Commit 2a9c03d

Browse files
committed
More logging when we have an error
* custom_components/daikin_onecta/daikin_api.py:
1 parent a202253 commit 2a9c03d

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

custom_components/daikin_onecta/daikin_api.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,20 @@ async def doBearerRequest(self, method, resourceUrl, options=None):
142142
self._last_patch_call = datetime.now()
143143
return True
144144

145-
_LOGGER.error("REQUEST TYPE %s FAILED: %s %s", method, res.status_code, res.text)
146-
147-
raise Exception("Communication failed! Status: " + str(res.status_code) + " " + res.text)
145+
_LOGGER.error("REQUEST TYPE %s FOR %s WITH OPTIONS %s FAILED: %s %s", method, resourceUrl, options, res.status_code, res.text)
146+
147+
raise Exception(
148+
"Communication failed! Status: "
149+
+ str(res.status_code)
150+
+ " "
151+
+ res.text
152+
+ " Method: "
153+
+ method
154+
+ " Url: "
155+
+ resourceUrl
156+
+ " Options: "
157+
+ str(optinons)
158+
)
148159

149160
async def getCloudDeviceDetails(self):
150161
"""Get pure Device Data from the Daikin cloud devices."""

0 commit comments

Comments
 (0)