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

Observation Instrumentation will double-wrap CompletionExceptions #780

Closed
osi opened this issue Aug 24, 2023 · 0 comments
Closed

Observation Instrumentation will double-wrap CompletionExceptions #780

osi opened this issue Aug 24, 2023 · 0 comments
Assignees
Labels
in: core Issues related to config and core support status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@osi
Copy link
Contributor

osi commented Aug 24, 2023

This line will unconditionally wrap error in a CompletionException. If the incoming error is already a CompletionException, this leads to confusing double-wrapping. Consider doing what CompletableFuture does and conditionally wrapping:

    /**
     * Returns the encoding of the given (non-null) exception as a
     * wrapped CompletionException unless it is one already.
     */
    static AltResult encodeThrowable(Throwable x) {
        return new AltResult((x instanceof CompletionException) ? x :
                             new CompletionException(x));
    }
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 24, 2023
@bclozel bclozel added type: bug A general bug in: core Issues related to config and core support and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 24, 2023
@bclozel bclozel self-assigned this Aug 24, 2023
@bclozel bclozel added this to the 1.2.3 milestone Aug 24, 2023
@bclozel bclozel added the for: backport-to-1.2.x Marks an issue as a candidate for backport to 1.2.x label Aug 28, 2023
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-1.2.x Marks an issue as a candidate for backport to 1.2.x labels Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues related to config and core support status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants