Bug: DockerDistributionAPIError suppresses error information #5361
Labels
area/docker
area/local/invoke
sam local invoke command
contributors/good-first-issue
Good first issue for a contributor
stage/waiting-for-release
Fix has been merged to develop and is waiting for a release
Description:
When
sam local invoke --debug
fails due to an unknown Docker APIError, the only output you see isError: Unknown API error received from docker
. Since this error handling was added in v1.83.0, I reverted to v1.82.0 to investigate and noticed the error was insteadError: 500 Server Error: Internal Server Error ("Get "https://public.ecr.aws/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")
.Steps to reproduce:
Not sure how to consistently reproduce the issue, but any non-404 APIError from docker will cause
sam local invoke
to fail with this errorObserved result:
Only output relevant to the failure is
Error: Unknown API error received from docker
even with--debug
set.Expected result:
The original APIError returned from Docker should be shown in the output
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 1.86.1The text was updated successfully, but these errors were encountered: