[NCBC-165] GetView doesn't return an exception if the view doesn't exist. Created: 26/Nov/12  Updated: 05/Feb/13  Resolved: 05/Feb/13

Status: Closed
Project: Couchbase .NET client library
Component/s: library
Affects Version/s: None
Fix Version/s: 1.2.1

Type: Bug Priority: Major
Reporter: Kyle Sama Assignee: John Zablocki (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Visual Studio 2012, .net Client, couchbase 2.0,

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.

Comment by John Zablocki (Inactive) [ 26/Dec/12 ]
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.
Comment by John Zablocki (Inactive) [ 18/Jan/13 ]
Baking better exceptions into the view reading process and providing a CheckExists method.
Comment by John Zablocki (Inactive) [ 05/Feb/13 ]
Generated at Sun Sep 21 13:09:47 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.