Open
Description
When the application of the metadata is in error, the fail method crash : apply() or fail() already called and hide the exception of the apply method.
public class BearerToken extends CallCredentials {
...
@Override
public void applyRequestMetadata(RequestInfo requestInfo, Executor executor, MetadataApplier applier) {
executor.execute(() -> {
try {
Metadata headers = new Metadata();
headers.put(META_DATA_KEY, header);
applier.apply(headers); // crash
} catch (Throwable e) {
applier.fail(Status.UNAUTHENTICATED.withCause(e)); // can't be called after crashed, error : apply() or fail() already called
}
});
}
}
Metadata
Metadata
Assignees
Labels
No labels