From d7208094b60fb3be11800b33f0c7d5e06ae21a3e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 14 Sep 2026 22:37:33 +0200 Subject: [PATCH] Update list of reasons for not found images. (#1315) --- changelogs/fragments/1315-images.yml | 2 ++ plugins/module_utils/_api/errors.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/1315-images.yml diff --git a/changelogs/fragments/1315-images.yml b/changelogs/fragments/1315-images.yml new file mode 100644 index 00000000..49e06c28 --- /dev/null +++ b/changelogs/fragments/1315-images.yml @@ -0,0 +1,2 @@ +bugfixes: + - "all modules using the vendored Docker SDK for Python - update list of reasons for not found images (https://github.com/ansible-collections/community.docker/pull/1315)." diff --git a/plugins/module_utils/_api/errors.py b/plugins/module_utils/_api/errors.py index c45928aa..ea7fba55 100644 --- a/plugins/module_utils/_api/errors.py +++ b/plugins/module_utils/_api/errors.py @@ -45,6 +45,8 @@ def create_api_error_from_http_exception(e: _HTTPError) -> t.NoReturn: "No such image" in str(explanation) or "not found: does not exist or no pull access" in str(explanation) or "repository does not exist" in str(explanation) + or "was found but does not match the specified platform" in str(explanation) + or "failed to resolve reference" in str(explanation) ): cls = ImageNotFound else: