docs: protected void appendErrorIfExists(XmlStringBuilder xml, XmlEnvironment enclosingXmlEnvironment) {
          StanzaError error = getError();
          if (error != null) {
              xml.append(error.toXML(enclosingXmlEnvironment));
          }
      }