Skip to content

Observation Instrumentation will double-wrap CompletionExceptions #780

Closed
@osi

Description

@osi

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));
    }

Metadata

Metadata

Assignees

Labels

in: coreIssues related to config and core supportstatus: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions