Use HTTP_BAD_REQUEST constant (#33797)
This commit is contained in:
1 parent
d510384c0d
commit
4c38e6cfa5
24 files changed
+111
-61
No files matched your search
@@ -21,6 +21,7 @@ from homeassistant.const import (
|
||||
CONF_RESOURCE,
|
||||
CONF_USERNAME,
|
||||
CONF_VERIFY_SSL,
|
||||
HTTP_BAD_REQUEST,
|
||||
HTTP_BASIC_AUTHENTICATION,
|
||||
HTTP_DIGEST_AUTHENTICATION,
|
||||
HTTP_INTERNAL_SERVER_ERROR,
|
||||
@@ -197,7 +198,7 @@ class RestNotificationService(BaseNotificationService):
|
||||
"Server error. Response %d: %s:", response.status_code, response.reason
|
||||
)
|
||||
elif (
|
||||
response.status_code >= 400
|
||||
response.status_code >= HTTP_BAD_REQUEST
|
||||
and response.status_code < HTTP_INTERNAL_SERVER_ERROR
|
||||
):
|
||||
_LOGGER.exception(
|
||||
|
||||
Reference in new issue
Block a user