Use common strings in Azure DevOps config flow (#41974)

This commit is contained in:
Ronaldo Lima authored and GitHub committed 2020-10-17 01:27:44 +02:00
1 parent 74a1b75919
commit 87deb2344c
3 files changed
+9 -9

No files matched your search

@@ -60,14 +60,14 @@ class AzureDevOpsFlowHandler(ConfigFlow, domain=DOMAIN):
if self._pat is not None:
await client.authorize(self._pat, self._organization)
if not client.authorized:
errors["base"] = "authorization_error"
errors["base"] = "invalid_auth"
return errors
project_info = await client.get_project(self._organization, self._project)
if project_info is None:
errors["base"] = "project_error"
return errors
except aiohttp.ClientError:
errors["base"] = "connection_error"
errors["base"] = "cannot_connect"
return errors
return None