Skip to content

Commit

Permalink
logging (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielhiversen authored Nov 9, 2024
1 parent 42c90d0 commit f42b5f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tibber/response_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ async def extract_response_data(response: ClientResponse) -> dict[Any, Any]:
if error_code == API_ERR_CODE_UNAUTH:
raise InvalidLoginError(response.status, error_message, error_code)

_LOGGER.error("FatalHttpExceptionError %s %s", error_message, error_code)
raise FatalHttpExceptionError(response.status, error_message, error_code)

error_code, error_message = extract_error_details(result.get("errors", []), "N/A")
# if reached here the HTTP response code is not currently handled
_LOGGER.error("FatalHttpExceptionError %s %s", error_message, error_code)
raise FatalHttpExceptionError(response.status, f"Unhandled error: {error_message}", error_code)

0 comments on commit f42b5f5

Please sign in to comment.