Skip to content

Commit

Permalink
Simplify class assignability check (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
fml2 authored Oct 9, 2024
1 parent 93a2ad8 commit 80dfd44
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public DefaultCommandExceptionHandlingStrategy(
}

public void handleCommandError(CommandWrapper command, Throwable throwable) {
if (StatusRuntimeException.class.isAssignableFrom(throwable.getClass())) {
if (throwable instanceof StatusRuntimeException) {
StatusRuntimeException exception = (StatusRuntimeException) throwable;
Status.Code code = exception.getStatus().getCode();

Expand Down

0 comments on commit 80dfd44

Please sign in to comment.