-
Notifications
You must be signed in to change notification settings - Fork 434
Open
Description
We should include an unwrapped exception in the last else block.
Lines 34 to 48 in 15ea1b8
| Throwable unwrapped = GRpcRuntimeExceptionWrapper.unwrap(e); | |
| final Optional<HandlerMethod> handlerMethod = methodResolver.resolveMethodByThrowable(call.getMethodDescriptor().getServiceName(), unwrapped); | |
| if (handlerMethod.isPresent()) { | |
| handle(handlerMethod.get(), call, customizer, e, headers, unwrapped); | |
| } else if (unwrapped instanceof StatusRuntimeException || unwrapped instanceof StatusException) { | |
| Status status = unwrapped instanceof StatusRuntimeException ? | |
| ((StatusRuntimeException) unwrapped).getStatus() : | |
| ((StatusException) unwrapped).getStatus(); | |
| Metadata metadata = unwrapped instanceof StatusRuntimeException ? | |
| ((StatusRuntimeException) unwrapped).getTrailers() : | |
| ((StatusException) unwrapped).getTrailers(); | |
| log.warn("Closing call with {}", status); | |
| call.close(status, Optional.ofNullable(metadata).orElseGet(Metadata::new)); | |
| } else { | |
| log.warn("Closing call with {}", Status.INTERNAL); |
Metadata
Metadata
Assignees
Labels
No labels