docs: 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;
      }
    }