Use common strings in Azure DevOps config flow (#41974)
This commit is contained in:
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user