code: public void queryError(OutputStream os,
                           HeadersAmp headers,
                           String address,
                           long qId,
                           Throwable exn)
      throws IOException
    {
      init(os);
  
      OutH3 out = _out;
  
      if (out == null)
        return;
  
      if (log.isLoggable(_level)) {
        log.log(_level, "query-error " + exn
                   + " (in " + this + ")" + " {to:" + address + ", " + headers + "}");
        
        if (log.isLoggable(Level.FINEST)) {
          log.log(Level.FINEST, exn.toString(), exn);
        }
      }
  
      try {
        out.writeLong(MessageTypeHamp.QUERY_ERROR.ordinal());
        writeHeaders(out, headers);
        
        writeToAddress(out, address);
        out.writeLong(qId);
  
        ErrorAmp error = ErrorAmp.create(exn);
  
        out.writeString(error.getCode().toString());
        out.writeString(error.getMessage());
        out.writeObject(error.getDetail());
  
        // XXX: out.flushBuffer();
      } catch (Throwable e) {
        log.log(Level.WARNING, e.toString(), e);
        
        throw e;
      }
    }
docs: Sends a message to a given address