|
|
@@ -356,7 +356,7 @@ class _AirbnbClient:
|
|
|
raise AirbnbAuthError(f'Airbnb credentials are stale — run: {_AUTH_HINT}')
|
|
|
if (cached := self._cache.get(d)) and cached.available == available:
|
|
|
return
|
|
|
- await self._mutate(
|
|
|
+ body = await self._mutate(
|
|
|
'EditPanelAvailabilityMutation', _HASHES['EditPanelAvailabilityMutation'],
|
|
|
{'input': {
|
|
|
'listingId': self._listing_id,
|
|
|
@@ -365,6 +365,9 @@ class _AirbnbClient:
|
|
|
}, 'blockNotesEnabled': True},
|
|
|
f'https://www.airbnb.com/multicalendar/{self._listing_id}/edit-selected-dates/{d}/{d}',
|
|
|
)
|
|
|
+ if errors := body.get('errors'):
|
|
|
+ _log.error('airbnb set_availability date=%s errors=%s', d, errors)
|
|
|
+ raise AirbnbAuthError(f'Airbnb set_availability failed for {d}: {errors[0].get("message", errors)}')
|
|
|
self.clear_cache()
|
|
|
_log.info('airbnb set_availability date=%s available=%s', d, available)
|
|
|
|