Skip to content

Commit

Permalink
fix: Disable Services w/ 404 Error (#453)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
coreywillwhat and pre-commit-ci[bot] authored Jul 26, 2024
1 parent 24f9ad4 commit 5bcfd20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ Disable Debug Logging
**Your Vehicle Details**
Model:
Year:
Type (ICE/PHEV/BEV):
Region (EU/US/CA/CN):
Type (Gas/Hybrid/Electric):
Region (EU/US/CA/CN):
16 changes: 8 additions & 8 deletions custom_components/audiconnect/audi_connect_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async def refresh_vehicle_data(self, vin: str):
)
return False
except ClientResponseError as cre:
if cre.status in (403, 502):
if cre.status in (403, 404):
_LOGGER.debug(
"ClientResponseError with status %s while refreshing vehicle data for VIN: %s. Disabling refresh vehicle data support.",
cre.status,
Expand Down Expand Up @@ -562,7 +562,7 @@ async def update_vehicle_statusreport(self):
except TimeoutError:
raise
except ClientResponseError as resp_exception:
if resp_exception.status in (403, 502):
if resp_exception.status in (403, 404):
self.support_status_report = False
else:
self.log_exception_once(
Expand Down Expand Up @@ -656,7 +656,7 @@ async def update_vehicle_position(self):
)
raise
except ClientResponseError as cre:
if cre.status in (403, 502):
if cre.status in (403, 404):
_LOGGER.error(
"POSITION: ClientResponseError with status %s for VIN: %s. Disabling vehicle position support.",
cre.status,
Expand Down Expand Up @@ -749,9 +749,9 @@ async def update_vehicle_climater(self):
)
raise
except ClientResponseError as cre:
if cre.status in (403, 502):
if cre.status in (403, 404):
_LOGGER.debug(
"ClientResponseError with status %s while updating climater for VIN: %s. Disabling climater support.",
"CLIMATER: ClientResponseError with status %s while updating climater for VIN: %s. Disabling climater support.",
cre.status,
redacted_vin,
)
Expand Down Expand Up @@ -791,7 +791,7 @@ async def update_vehicle_preheater(self):
except TimeoutError:
raise
except ClientResponseError as resp_exception:
if resp_exception.status == 403 or resp_exception.status == 502:
if resp_exception.status in (403, 404):
# _LOGGER.error(
# "support_preheater set to False: {status}".format(
# status=resp_exception.status
Expand Down Expand Up @@ -891,7 +891,7 @@ async def update_vehicle_charger(self):
except TimeoutError:
raise
except ClientResponseError as resp_exception:
if resp_exception.status == 403 or resp_exception.status == 502:
if resp_exception.status in (403, 404):
# _LOGGER.error(
# "support_charger set to False: {status}".format(
# status=resp_exception.status
Expand Down Expand Up @@ -963,7 +963,7 @@ async def update_vehicle_tripdata(self, kind: str):
)
raise
except ClientResponseError as cre:
if cre.status in (403, 502):
if cre.status in (403, 404):
_LOGGER.debug(
"ClientResponseError with status %s while updating trip data for VIN: %s. Disabling trip data support.",
cre.status,
Expand Down

0 comments on commit 5bcfd20

Please sign in to comment.