Description
The couchbase maunal shows the JSON for view responses:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-writing-querying-errorcontrol.html
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)
{