This is my code where i have problem:
try {
publisher.publish(payload).get();
} catch (com.google.api.gax.rpc.DeadlineExceededException e) {
LOGGER.error("com.google.api.gax.rpc.DeadlineExceededException occured: " + e.getCause());
} catch (com.google.api.gax.rpc.NotFoundException e) {
LOGGER.error("com.google.api.gax.rpc.NotFoundException occured: " + e.getCause());
} catch (com.google.api.gax.rpc.ApiException e) {
LOGGER.error("com.google.api.gax.rpc.ApiException occured: " + e.getCause());
} catch (io.grpc.StatusRuntimeException e) {
LOGGER.error("io.grpc.StatusRuntimeException occured: " + e.getCause());
} catch (java.lang.RuntimeException e) {
LOGGER.error("RuntimeException occured: " + e.getCause());
} catch (java.util.concurrent.ExecutionException e) {
LOGGER.error("java.util.concurrent.ExecutionException occured: " + e.getCause()); // my program cursor always come to this point
} catch (Exception e) {
LOGGER.error("Exception occured: " + e.getCause());
}
And the getCause of ExecutionException catch is:
java.util.concurrent.ExecutionException occured: com.google.api.gax.rpc.NotFoundException: io.grpc.StatusRuntimeException: NOT_FOUND: Resource not found
If you see I already put the catch for "com.google.api.gax.rpc.NotFoundException" in second catch, so why it went into the ExcutionException catch.
Due to this nature I am not able to write proper message for the client to address.
Thanks in advance if anyone can help.