private static boolean isPermanentError(Throwable throwable) {
    Status status = getStatus(throwable);

    switch (status.getCode()) {
      case CANCELLED:
      case UNKNOWN:
      case DEADLINE_EXCEEDED:
      case RESOURCE_EXHAUSTED:
      case INTERNAL:
      case UNAVAILABLE:
      case UNAUTHENTICATED:
        return false;
      default:
        return true;
    }
  }
private static boolean isPermanentError ( Throwable throwable ) { Status status = getStatus ( throwable ) ; switch ( status . getCode ( ) ) { case CANCELLED : case UNKNOWN : case DEADLINE_EXCEEDED : case RESOURCE_EXHAUSTED : case INTERNAL : case UNAVAILABLE : case UNAUTHENTICATED : return false ; default : return true ; } }
Determines whether a GRPC Error is considered permanent and should not be retried.