Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: DockerDistributionAPIError suppresses error information #5361

Closed
Patman12 opened this issue Jun 13, 2023 · 2 comments
Closed

Bug: DockerDistributionAPIError suppresses error information #5361

Patman12 opened this issue Jun 13, 2023 · 2 comments
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

Comments

@Patman12
Copy link

Patman12 commented Jun 13, 2023

Description:

When sam local invoke --debug fails due to an unknown Docker APIError, the only output you see is Error: 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 instead Error: 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 error

Observed 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)

  1. OS: macOS Monterey
  2. sam --version: 1.86.1
  3. AWS region: N/A
  "version": "1.82.0",
  "system": {
    "python": "3.11.4",
    "os": "macOS-12.6.6-x86_64-i386-64bit"
  },
  "additional_dependencies": {
    "docker_engine": "24.0.2",
    "aws_cdk": "Not available",
    "terraform": "Not available"
  }
}```
@Patman12 Patman12 added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Jun 13, 2023
@lucashuy
Copy link
Contributor

Hi, thanks for raising this issue! It doesn't seem like too much of an ask to include the original message in the caught message. As a general call out, we are open to contributions from the community regarding this, feel free to reach out if there any questions

@lucashuy lucashuy added contributors/good-first-issue Good first issue for a contributor area/docker area/local/invoke sam local invoke command and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Jun 13, 2023
@hnnasit hnnasit added the stage/waiting-for-release Fix has been merged to develop and is waiting for a release label Aug 14, 2023
@github-actions
Copy link
Contributor

Patch is released in v1.96.0. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants