Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
3.0.5
-
None
-
None
-
1
-
Medium
Description
Use case
The document stored user profile information with an email field. The user clears his email and saves his profile.
Steps to reproduce
- Create a new document
{
"name": "User1",
"email": "email"
}
- Mutate the document using the .NET client 3.0.5.
class Program
{
private static ICluster _cluster;
static async Task Main(string[] args)
{
var userInfo = new
{
Name = "User1",
Email = (string)null
};
_cluster = await Cluster.ConnectAsync("couchbase://localhost", "Administrator", "Password");
var bucket = await _cluster.BucketAsync("items");
await bucket.DefaultCollection().MutateInAsync("doc1", new[]
{
MutateInSpec.Upsert("name", userInfo.Name),
MutateInSpec.Upsert("email", userInfo.Email)
});
_cluster.Dispose();
}
}
#The following exception is show:
Couchbase.Core.Exceptions.InvalidArgumentException
|
{"DispatchedFrom":null,"DispatchedTo":null,"DocumentKey":"doc1","ClientContextId":"19","Cas":0,"Status":4,"BucketName":"items","CollectionName":"_default","ScopeName":null,"Message":"KV Error: {Name=\"EINVAL\", Description=\"Invalid packet\", Attributes=\"internal,invalid-input\"}"}
|