code: public boolean isClientError(IOException e) {
      GoogleJsonResponseException jsonException = getJsonResponseExceptionOrNull(e);
      if (jsonException != null) {
        return (getHttpStatusCode(jsonException)) / 100 == 4;
      }
      return false;
    }
docs: Determines if the exception is a client error.