Misleading error message for failed step
If I add a cmd into a step and it fails, the resulting error message is not really indicative of the actual problem.
Here's the relevant logs from the container after a failed request: (Note the cmd: "pip99" "install" "-r" "requirements.txt" - probably failed with something like command not found: pip99). We should see the command not found: pip99 message more prominently than (or entirely in place of) HTTP Error: 400
runner_1 | 2021-02-25T14:44:35.973Z f9633017072a DEBUG [runner.docker:163] - Creating new container with: image: sha256:8a62789c5272a405f7aad44f54ff0d38c99f15b6e6d251ba38151cfbc9f39194 cmd: ["pip99" "install" "-r" "requirements.txt"] evars: [] working-dir: /root/source
runner_1 | 2021-02-25T14:44:36.161Z f9633017072a DEBUG [runner.docker:236] - Starting container a056b490805fa895e2dce757af6f33916c0439dc72509c001ef9375aeb15045e
runner_1 | 2021-02-25T14:44:36.794Z f9633017072a ERROR [runner.docker:255] - Error running container: HTTP Error: 400
runner_1 | 2021-02-25T14:44:36.796Z f9633017072a DEBUG [runner.pipeline:132] - Removing failed container a056b490805fa895e2dce757af6f33916c0439dc72509c001ef9375aeb15045e
runner_1 | 2021-02-25T14:44:36.897Z f9633017072a ERROR [runner.pipeline:172] - Failed executing step {:needs_resource "source", :cmd "pip33 install -r requirements.txt"} with error HTTP Error: 400
runner_1 | 2021-02-25T14:44:36.901Z f9633017072a INFO [runner.pipeline:229] - Marking run r-64c15f4a-e762-4525-9231-6a181e870aa8 as failed with reason: HTTP Error: 400
runner_1 | 2021-02-25T14:44:36.924Z f9633017072a DEBUG [runner.pipeline:63] - Deleting all images for run r-64c15f4a-e762-4525-9231-6a181e870aa8
runner_1 | 2021-02-25T14:44:37.159Z f9633017072a ERROR [runner.errors:23] - Pipeline failure: HTTP Error: 400
This is caused by a bad request via clj-docker-client with a non-existent path as CMD to the docker daemon which responds with a 400. We should read the response body not just the status code.
Needs https://github.com/into-docker/clj-docker-client/issues/37 to be released