Skip to content

Commit d755b41

Browse files
committed
debug: Add more detailed logging for API requests and responses
1 parent 2e1fdb0 commit d755b41

File tree

1 file changed

+3
-1
lines changed
  • custom_components/ecoflow_api

1 file changed

+3
-1
lines changed

custom_components/ecoflow_api/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ async def _handle_response(
232232
EcoFlowApiError: If API returns an error
233233
"""
234234
text = await response.text()
235-
_LOGGER.debug("Response status: %s, body: %s", response.status, text)
235+
_LOGGER.debug("Response status: %s", response.status)
236+
_LOGGER.debug("Response headers: %s", dict(response.headers))
237+
_LOGGER.debug("Response body: %s", text[:500] if len(text) > 500 else text)
236238

237239
if response.status == 401:
238240
raise EcoFlowAuthError("Authentication failed - check your API credentials")

0 commit comments

Comments
 (0)