Skip to content

api: preserve cause when re-raising error#3023

Merged
milas merged 1 commit into
docker:mainfrom
milas:error-cause
Jul 29, 2022
Merged

api: preserve cause when re-raising error#3023
milas merged 1 commit into
docker:mainfrom
milas:error-cause

Conversation

@milas
Copy link
Copy Markdown
Contributor

@milas milas commented Jul 28, 2022

Use from e to ensure that the error context is propagated
correctly.

Fixes #2702.

@milas milas requested a review from a team July 28, 2022 22:18
@milas milas self-assigned this Jul 28, 2022
Use `from e` to ensure that the error context is propagated
correctly.

Fixes docker#2702.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
@milas milas merged commit 05e1434 into docker:main Jul 29, 2022
@milas milas deleted the error-cause branch July 29, 2022 15:08
@milas milas added this to the 6.0.0 milestone Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not a Contribution: create_api_error_from_api_exception should "raise <exception> from <original-error>" to preserve error message

2 participants