Details
-
Bug
-
Resolution: Duplicate
-
Major
-
3.2.4
-
None
-
None
-
SDK 3.2.4
-
1
Description
Performing a basic test it was found that PathNotFoundException was not thrown when a subdocument path doesnt exist.
Look at the code below
static async Task Main(string[] args) |
{
|
try |
{
|
var cluster = await Couchbase.Cluster.ConnectAsync("couchbase://localhost", "Administrator", "password"); |
var bucket = await cluster.BucketAsync("travel-sample"); |
var scope = await bucket.ScopeAsync("inventory"); |
var coll = await scope.CollectionAsync("airport"); |
var key = "airport-500001"; |
var document = new { id=500001, type = "airport", airportname = "Francis Airport", Country = "France" }; |
await coll.UpsertAsync<dynamic>(key, document);
|
var airportDoc = await coll.GetAsync(key);
|
Console.WriteLine(airportDoc.ContentAs<dynamic>());
|
var result = await coll.LookupInAsync(key, specs=>specs.Get("some-field-that-doesnt-exist")); |
Console.WriteLine("LookupIn Output Is " + result.ContentAs<string>(0)); |
|
}
|
catch (CouchbaseException ex) |
{
|
Console.WriteLine(ex);
|
|
}
|
catch (Exception ex) |
{
|
Console.WriteLine(ex);
|
}
|
Console.Read();
|
}
|
Attachments
Issue Links
- is duplicated by
-
NCBC-3073 PersistentDictionary. TryGetValue does not properly map path not found error
- Resolved