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

GetView doesn't return an exception if the view doesn't exist.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.1
    • Component/s: library
    • Labels:
      None
    • Environment:
      Visual Studio 2012, .net Client, couchbase 2.0,
      win7/x64

      Description

      When you call var result = _couchClient.GetView(<etc.>), there is no exception thrown when the view does not exist. The program will only throw an exception when it attempts to access the data, ie: result.Count() will throw an exception.

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

        Activity

        Hide
        john John Zablocki (Inactive) added a comment -

        Released

        Show
        john John Zablocki (Inactive) added a comment - Released
        Hide
        john John Zablocki (Inactive) added a comment -

        Baking better exceptions into the view reading process and providing a CheckExists method.

        Show
        john John Zablocki (Inactive) added a comment - Baking better exceptions into the view reading process and providing a CheckExists method.
        Hide
        john John Zablocki (Inactive) added a comment -

        The view isn't queried until the IEnumerable is actually iterated over. Therefore when you call GetView, there's no way to know that the view doesn't exist.

        I will look into catching the 400 error and throwing a more meaningful exception.

        Show
        john John Zablocki (Inactive) added a comment - The view isn't queried until the IEnumerable is actually iterated over. Therefore when you call GetView, there's no way to know that the view doesn't exist. I will look into catching the 400 error and throwing a more meaningful exception.

          People

          • Assignee:
            john John Zablocki (Inactive)
            Reporter:
            kyle.sama Kyle Sama
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes