diff --git a/homeassistant/components/hassio/auth.py b/homeassistant/components/hassio/auth.py index 23b91ac40bc..a1c032fe0fe 100644 --- a/homeassistant/components/hassio/auth.py +++ b/homeassistant/components/hassio/auth.py @@ -82,7 +82,7 @@ class HassIOAuth(HassIOBaseAuth): data[ATTR_USERNAME], data[ATTR_PASSWORD] ) except auth_ha.InvalidAuth: - raise HTTPUnauthorized() from None + raise HTTPNotFound() from None return web.Response(status=HTTP_OK) diff --git a/tests/components/hassio/test_auth.py b/tests/components/hassio/test_auth.py index 5f27c06a190..a533d468069 100644 --- a/tests/components/hassio/test_auth.py +++ b/tests/components/hassio/test_auth.py @@ -66,7 +66,7 @@ async def test_login_error(hass, hassio_client_supervisor): ) # Check we got right response - assert resp.status == 401 + assert resp.status == 404 mock_login.assert_called_with("test", "123456")