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

Does not return errors object on view operation



    • New Feature
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.2.7
    • 1.3.1
    • library


      The couchbase maunal shows the JSON for view responses:

      The Java and python SDK have ability to access errors .net does not.

      Looking at CouchbaseViewHandler. It looks like its meant to be throwing an exception when it gets errors in the JSON. However that exception will never happen as there is a bug on lines 95 to 101 (code below). The two if statements counter each other. You can fix it via calling jsonReader.Read() after the 1st if statement however I believe that is not the correct solution. We should return an error object. I think the whole IEnumerator<T> TransformResults<T>(Func<JsonReader, T> rowTransformer, IDictionary<string, string> viewParams) needs looking at.

      if (jsonReader.TokenType == JsonToken.PropertyName
      && jsonReader.Depth == 1
      && ((string)jsonReader.Value) == "errors")
      // we skip the deserialization if the array is null
      if (jsonReader.TokenType == Newtonsoft.Json.JsonToken.StartArray)


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


          pvarley Patrick Varley created issue -
          jmorris Jeff Morris made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Critical [ 2 ]
          jmorris Jeff Morris made changes -
          Priority Critical [ 2 ] Blocker [ 1 ]
          ingenthr Matt Ingenthron made changes -
          Assignee Matt Ingenthron [ ingenthr ] Jeff Morris [ jmorris ]
          jmorris Jeff Morris made changes -
          Fix Version/s 1.3.1 [ 11318 ]
          jmorris Jeff Morris made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          brett19 Brett Lawson made changes -
          Workflow jira [ 29108 ] Couchbase SDK Workflow [ 43177 ]


            jmorris Jeff Morris
            pvarley Patrick Varley
            0 Vote for this issue
            3 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes