code: private Exception handleXmlStreamException(XMLStreamException e) throws Exception {
          if (e.getNestedException() instanceof IOException) {
              return new IOException(e);
          }
          return e;
      }
docs: If the exception was caused by an {@link IOException}, wrap it an another IOE so
  that it will be exposed to the RetryPolicy.