testcontainers / testcontainers/testcontainers-php
Improve error message when pulling from a private registry
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 215
- Forks
- 34
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 3
Description
Hi,
When pulling from a non existent repository, the error is :
1) Exception in third-party event subscriber: repository does not exist or no read access
#0 /builds/group/project/vendor/beluga-php/docker-php/src/Endpoint/ImageCreate.php(20): Docker\API\Endpoint\ImageCreate->transformResponseBody()
But when the repository exists and require login, it's just a generic error:
1) Exception in third-party event subscriber: Call to a member function wait() on null
#0 /builds/group/project/vendor/testcontainers/testcontainers/src/Container/GenericContainer.php(305): Testcontainers\Container\GenericContainer->pullImage()
In this case the error message should be repository does not exist or no read access too
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/Container/GenericContainer.php around pullImage(), referenced at line 305, and compare its private-registry failure path with the response handling in ImageCreate.php. Reproduce a pull from an existing repository that requires login and confirm that the resulting error is reported as "repository does not exist or no read access" rather than a null wait() error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100