Skip to content

Commit

Permalink
Stringify response
Browse files Browse the repository at this point in the history
  • Loading branch information
kopiro committed Aug 27, 2024
1 parent d14a705 commit 3d51100
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tapoCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,11 @@ export class TAPOCamera extends OnvifCamera {
responseData = responseDataTmp as TAPOCameraResponse;
}

this.log.debug("API response", response.status, responseData);
this.log.debug(
"API response",
response.status,
JSON.stringify(responseData)
);

// Apparently the Tapo C200 returns 500 on successful requests,
// but it's indicating an expiring token, therefore refresh the token next time
Expand All @@ -503,11 +507,7 @@ export class TAPOCamera extends OnvifCamera {
responseData.error_code === -40401 ||
responseData.error_code === -1
) {
this.log.debug(
"API request failed, trying reauth",
response.status,
responseData
);
this.log.debug("API request failed, trying reauth");
this.stok = undefined;
return this.apiRequest(req, loginRetryCount + 1);
}
Expand Down

0 comments on commit 3d51100

Please sign in to comment.