mirror of
https://github.com/home-assistant/core
synced 2024-09-28 03:04:04 +02:00
Allow specific status codes while notifying mobile_app devices (#30496)
* Removed check and return with a notification status of 201 * Allow additional result codes Allow 200, 201, and 202 as valid result codes
This commit is contained in:
parent
5ec5df77cc
commit
4a2987e790
@ -134,9 +134,9 @@ class MobileAppNotificationService(BaseNotificationService):
|
||||
response = await self._session.post(push_url, json=data)
|
||||
result = await response.json()
|
||||
|
||||
if response.status == 201:
|
||||
if response.status in [200, 201, 202]:
|
||||
log_rate_limits(self.hass, entry_data[ATTR_DEVICE_NAME], result)
|
||||
return
|
||||
continue
|
||||
|
||||
fallback_error = result.get("errorMessage", "Unknown error")
|
||||
fallback_message = "Internal server error, please try again later: {}".format(
|
||||
|
Loading…
Reference in New Issue
Block a user