Skip to content

improve push failure errors#36

Merged
alexcb merged 1 commit into
earthly-mainfrom
acb/better-error-message-on-push
Nov 24, 2023
Merged

improve push failure errors#36
alexcb merged 1 commit into
earthly-mainfrom
acb/better-error-message-on-push

Conversation

@alexcb

@alexcb alexcb commented Nov 23, 2023

Copy link
Copy Markdown
Contributor

If the push fails, the registry might include additional error messages in the body of the http response; we should include it in the error we return to the client.

This changes an error such as

unexpected status from PUT request to https://123456789.dkr.ecr.us-west-2.amazonaws.com/v2/integration-test/manifests/latest: 403 Forbidden

to

unexpected status from PUT request to https://123456789.dkr.ecr.us-west-2.amazonaws.com/v2/integration-test/manifests/latest: 403 Forbidden body={"errors":[{"code":"DENIED","message":"The repository with name 'my-cool-image' in registry with id '123456789' already has the maximum allowed number of images which is '10000'"}]}

If the push fails, the registry might include additional error messages
in the body of the http response; we should include it in the error we
return to the client.

This changes an error such as

    unexpected status from PUT request to https://123456789.dkr.ecr.us-west-2.amazonaws.com/v2/integration-test/manifests/latest: 403 Forbidden

to

    unexpected status from PUT request to https://123456789.dkr.ecr.us-west-2.amazonaws.com/v2/integration-test/manifests/latest: 403 Forbidden body={"errors":[{"code":"DENIED","message":"The repository with name 'my-cool-image' in registry with id '123456789' already has the maximum allowed number of images which is '10000'"}]}

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
@alexcb alexcb merged commit 54a4452 into earthly-main Nov 24, 2023
@alexcb alexcb deleted the acb/better-error-message-on-push branch January 26, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants