{"record":{"id":"3b3d015dda57c587","repo":"ansible/ansible","slug":"unhandled-exception-when-retrieving-config-r","errorCode":null,"errorMessage":"Unhandled exception when retrieving {config!r}.","messagePattern":"Unhandled exception when retrieving (.+?)\\.","errorType":"exception","errorClass":"AnsibleError","httpStatus":null,"severity":"error","filePath":"lib/ansible/config/manager.py","lineNumber":564,"sourceCode":"        config: str,\n        cfile: str | None = None,\n        plugin_type: str | None = None,\n        plugin_name: str | None = None,\n        keys=None,\n        variables=None,\n        direct=None,\n        *,\n        templar: Templar | None = None,\n    ) -> t.Any:\n        \"\"\" wrapper \"\"\"\n\n        try:\n            value, _drop = self.get_config_value_and_origin(config, cfile=cfile, plugin_type=plugin_type, plugin_name=plugin_name,\n                                                            keys=keys, variables=variables, direct=direct, templar=templar)\n        except AnsibleError:\n            raise\n        except Exception as ex:\n            raise AnsibleError(f\"Unhandled exception when retrieving {config!r}.\") from ex\n        return value\n\n    def get_config_default(self, config: str, plugin_type: str | None = None, plugin_name: str | None = None) -> t.Any:\n        \"\"\"Return the default value for the specified configuration.\"\"\"\n        return self.get_configuration_definitions(plugin_type, plugin_name)[config]['default']\n\n    def get_config_value_and_origin(\n            self,\n            config: str,\n            cfile: str | None = None,\n            plugin_type: str | None = None,\n            plugin_name: str | None = None,\n            keys=None,\n            variables=None,\n            direct=None,\n            *,\n            templar: Templar | None = None\n    ) -> tuple[str, t.Any]:","sourceCodeStart":546,"sourceCodeEnd":582,"githubUrl":"https://github.com/ansible/ansible/blob/9cf16a4aca7898481c257f1e17ad28d0b67b1f85/lib/ansible/config/manager.py#L546-L582","documentation":"Error \"Unhandled exception when retrieving {config!r}.\" thrown in ansible/ansible.","triggerScenarios":"Thrown at lib/ansible/config/manager.py:564 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the config definition file exists and is readable.","Run with -vvv to see the underlying exception and fix the reported cause.","Verify no syntax errors exist in the plugin's config definition."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9cf16a4aca7898481c257f1e17ad28d0b67b1f85","analyzedAt":"2026-08-15T00:15:47.100Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}