Skip to content

Commit

Permalink
Fix mypy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasddn committed Jan 22, 2025
1 parent eef1b2e commit 0c93622
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/volvo_cars/volvo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ async def _async_request(

if data and (error_data := data.get("error")):
error = VolvoCarsErrorResult.from_dict(error_data)
message = f"{error.message}. {error.description}".strip()

if error is not None:
message = f"{error.message}. {error.description}".strip()

if ex.status in (401, 403):
raise VolvoAuthException(message) from redacted_exception
Expand Down

0 comments on commit 0c93622

Please sign in to comment.