mirror of
https://github.com/home-assistant/core.git
synced 2026-09-09 07:01:41 +01:00
Refactor config flow with Exception in Portainer (#176600)
This commit is contained in:
@@ -16,7 +16,6 @@ import voluptuous as vol
|
||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||
from homeassistant.const import CONF_API_TOKEN, CONF_URL, CONF_VERIFY_SSL
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
from homeassistant.helpers.selector import (
|
||||
BooleanSelector,
|
||||
@@ -198,13 +197,13 @@ class PortainerConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
)
|
||||
|
||||
|
||||
class CannotConnect(HomeAssistantError):
|
||||
class CannotConnect(Exception):
|
||||
"""Error to indicate we cannot connect."""
|
||||
|
||||
|
||||
class InvalidAuth(HomeAssistantError):
|
||||
class InvalidAuth(Exception):
|
||||
"""Error to indicate there is invalid auth."""
|
||||
|
||||
|
||||
class PortainerTimeout(HomeAssistantError):
|
||||
class PortainerTimeout(Exception):
|
||||
"""Error to indicate a timeout occurred."""
|
||||
|
||||
Reference in New Issue
Block a user