Uploaded image for project: 'C++ Couchbase Client'
  1. C++ Couchbase Client
  2. CXXCBC-13

A parsing_error when listing all buckets`

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.0-beta
    • None
    • None
    • None
    • 1

    Description

      My cluster wrapper code has a cluster.buckets() call.  When implementing it like this:

      std::list<std::string>
      cb::cluster::buckets()
      {
          couchbase::operations::bucket_get_all_request req;
          auto barrier = std::make_shared<std::promise<couchbase::operations::bucket_get_all_response>>();
          auto f = barrier->get_future();
          cluster_->execute_http(req, [barrier](couchbase::operations::bucket_get_all_response&& resp) mutable { barrier->set_value(resp); });
          auto resp = f.get();
          if (resp.ctx.ec) {
              throw std::runtime_error(resp.ctx.ec.message());
          }
          std::list<std::string> retval;
          for( auto& b : resp.buckets) {
              retval.push_back(b.name);
          }
          return retval;
      }

      I get a parsing_error as the error code's message (the value is 9), against a 7.0 cluster.  

      Attachments

        1. buckets1.pcapng
          13 kB
          David Kelly
        2. cbd_buckets.json
          22 kB
          David Kelly

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              avsej Sergey Avseyev
              david.kelly David Kelly (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes