Skip to content

Commit

Permalink
Make google tasks recoverable (#134092)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek authored Dec 27, 2024
1 parent 5e0088f commit 7076ba7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/google_tasks/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from googleapiclient.discovery import Resource, build
from googleapiclient.errors import HttpError
from googleapiclient.http import BatchHttpRequest, HttpRequest
from httplib2 import ServerNotFoundError

from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -150,7 +151,7 @@ async def move(
async def _execute(self, request: HttpRequest | BatchHttpRequest) -> Any:
try:
result = await self._hass.async_add_executor_job(request.execute)
except HttpError as err:
except (HttpError, ServerNotFoundError) as err:
raise GoogleTasksApiError(
f"Google Tasks API responded with: {err.reason or err.status_code})"
) from err
Expand Down

0 comments on commit 7076ba7

Please sign in to comment.