mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-20 21:25:14 +02:00
fix: stop reporting a missing image as a network problem
A 404 from the registry means the image name is wrong or the registry needs authentication, but the pull wrapped every error with "please check your Internet connection". Say what actually failed and keep the network advice for the other errors.
This commit is contained in:
2 files changed
+27
-2
No files matched your search
@@ -396,10 +396,17 @@ class Docker(BaseManager):
|
||||
params={"fromImage": image},
|
||||
timeout=aiohttp.ClientTimeout(total=None, sock_read=PULL_IDLE_TIMEOUT),
|
||||
)
|
||||
except DockerHttp404Error as e:
|
||||
raise DockerError(
|
||||
f"Could not pull the '{image}' image: it was not found in the registry. "
|
||||
f"Check the image name or run 'docker login' on the compute host "
|
||||
f"(original error: {e})"
|
||||
)
|
||||
except DockerError as e:
|
||||
raise DockerError(
|
||||
f"Could not pull the '{image}' image from Docker repository, "
|
||||
f"please check your Internet connection (original error: {e})"
|
||||
f"Could not pull the '{image}' image from Docker repository. "
|
||||
f"Check the image name, the registry authentication and your Internet connection "
|
||||
f"(original error: {e})"
|
||||
)
|
||||
# The pull api will stream status via an HTTP JSON stream
|
||||
content = ""
|
||||
|
||||
Reference in new issue
Block a user