-
Notifications
You must be signed in to change notification settings - Fork 866
Open
Labels
bugSomething does not work as expectedSomething does not work as expected
Description
@GrpcAdvice
public class ExceptionHandler {
@GrpcExceptionHandler(Exception.class)
public StatusException handleGenericException(Exception e) {
String message = StringUtils.hasText(e.getMessage())
? e.getMessage()
: "An unexpected error occurred. Please try again later";
return Status.INTERNAL.withDescription(message)
.withCause(e)
.asException();
}
}Given the above code, the cause is not propagated to client when the client catches the exception. The client finds it as null. It looks like it gets deleted somewhere before it gets to the client, so the withCause() call has no effect.
Which versions do you use?
- Spring (boot): 3.2.8
- grpc-spring-boot-starter: 2.1.5.RELEASE
- java: version + architecture (64bit?): Java 21, 64bit architecture
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething does not work as expectedSomething does not work as expected