Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2230

QueryException missing XxxxContext

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.0
    • 3.0.0-beta.3
    • library
    • None
    • 1
    • SDK1: GA and Priority List

    Description

      When writing some code to look for and create indexes if not available, a QueryException was thrown.

      I wrote something to look at the exception

                      if (ex is QueryException) {
                          QueryException qx = ex as QueryException;
                          Console.WriteLine($"Query exception message: {qx.Message}; status: {qx.Status}");
                      }
      

      that prints out this:
      Query exception message: Exception of type 'Couchbase.Query.QueryException' was thrown.; status: Success

      Per the sdk-rfc, this should probably have contextual status.

      Logs on the server side show:

      2020-01-03T11:53:26.521-08:00 [Info] CreateIndex 0 verification/#primary using:GSI exprType:N1QL whereExpr:<ud>()</ud> secExprs:<ud>([])</ud> desc:[] isPrimary:true scheme:SINGLE  partitionKeys:<ud>([])</ud> with: - elapsed(11.563µs) err(Index #primary already exists.)
      

      But this didn't come through.

      Attachments

        For Gerrit Dashboard: NCBC-2230
        # Subject Branch Project Status CR V

        Activity

          People

            jmorris Jeff Morris
            ingenthr Matt Ingenthron
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty