{"record":{"id":"3ef2142297b94275","repo":"home-assistant/core","slug":"no-data-returned-from-azure-devops","errorCode":null,"errorMessage":"No data returned from Azure DevOps","messagePattern":"No data returned from Azure DevOps","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/azure_devops/coordinator.py","lineNumber":44,"sourceCode":"from .data import AzureDevOpsData\n\nBUILDS_QUERY: Final = \"?queryOrder=queueTimeDescending&maxBuildsPerDefinition=1\"\nIGNORED_CATEGORIES: Final[list[Category]] = [Category.COMPLETED, Category.REMOVED]\n\ntype AzureDevOpsConfigEntry = ConfigEntry[AzureDevOpsDataUpdateCoordinator]\n\n\ndef ado_exception_none_handler(func: Callable) -> Callable:\n    \"\"\"Handle exceptions or None to always return a value or raise.\"\"\"\n\n    async def handler(*args, **kwargs):\n        try:\n            response = await func(*args, **kwargs)\n        except aiohttp.ClientError as exception:\n            raise UpdateFailed from exception\n\n        if response is None:\n            raise UpdateFailed(\"No data returned from Azure DevOps\")\n\n        return response\n\n    return handler\n\n\nclass AzureDevOpsDataUpdateCoordinator(DataUpdateCoordinator[AzureDevOpsData]):\n    \"\"\"Class to manage and fetch Azure DevOps data.\"\"\"\n\n    client: DevOpsClient\n    config_entry: AzureDevOpsConfigEntry\n    organization: str\n    project: Project\n\n    def __init__(\n        self,\n        hass: HomeAssistant,\n        config_entry: AzureDevOpsConfigEntry,","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/azure_devops/coordinator.py#L26-L62","documentation":"Raised as UpdateFailed('No data returned from Azure DevOps') by the ado_exception_none_handler decorator when a wrapped coordinator method returns None instead of raising — the aiohttp call succeeded at the transport level but the DevOps client produced no object (empty/empty-looking response). Separately, aiohttp.ClientError is converted to a message-less UpdateFailed.","triggerScenarios":"get_project()/get_builds()/get_pull_request() etc. return None: project name or ID not found in the organization, wrong PAT scope so the API returns an empty payload, or the organization/project renamed so lookups resolve to nothing.","commonSituations":"Project was renamed or deleted; PAT lacks the required scope (e.g. Build/Code Read); organization name typo'd; personal access token expired in a way that yields empty responses instead of an auth error.","solutions":["Verify the project identifier in the config entry matches an existing project in the Azure DevOps organization.","Re-create the PAT with the correct scopes (Code Read, Build Read, etc.) and re-authenticate.","Confirm the organization name is correct and the account can see the project.","Watch for the sibling case: if UpdateFailed has no message text, the underlying cause was an aiohttp.ClientError — check network/proxy."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"async def project_exists(client, organization: str, project: str) -> bool:\n    projects = await client.get_projects(organization)\n    return any(p.name.lower() == project.lower() or p.id == project for p in projects or [])\n","typeGuard":"def has_data(response) -> bool:\n    return response is not None\n","tryCatchPattern":"from homeassistant.helpers.update_coordinator import UpdateFailed\nimport aiohttp\n\ntry:\n    data = await coordinator.async_refresh()\nexcept UpdateFailed as err:\n    if not str(err):  # empty message == aiohttp.ClientError underneath\n        check_network_proxy()\n    else:  # 'No data returned' == empty response: check project/PAT scope\n        check_project_and_pat()","preventionTips":["Confirm project and organization names case-sensitively against Azure DevOps.","Scope PATs to Code (Read), Build (Read), Project and Team (Read).","Watch for the message-less variant — it signals a transport-level ClientError instead."],"tags":["home-assistant","azure-devops","coordinator","pat","configuration"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}