Use HTTP_BAD_REQUEST constant (#33797)

This commit is contained in:
springstan 2020-04-09 21:43:42 +02:00 committed by GitHub
parent d510384c0d
commit 4c38e6cfa5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 111 additions and 61 deletions

View file

@ -9,7 +9,7 @@ import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.http import HomeAssistantView
from homeassistant.const import CONF_SENSORS
from homeassistant.const import CONF_SENSORS, HTTP_BAD_REQUEST
from homeassistant.core import callback
from .const import (
@ -207,5 +207,5 @@ class LogiCircleAuthCallbackView(HomeAssistantView):
)
return self.json_message("Authorisation code saved")
return self.json_message(
"Authorisation code missing from query string", status_code=400
"Authorisation code missing from query string", status_code=HTTP_BAD_REQUEST
)