JavaSDK: Cannot get DesignDocuments for bucket


#1

I’m trying create DesignDocument with few views via JavaSDK (2.2.2).

DesignDocument designDoc = DesignDocument.create(designDocName, views);
bucket.bucketManager().upsertDesignDocument(designDoc);
, where
bucket - couchbase bucket (com.couchbase.client.java.Bucket)
designDocName - document name;
views - list of Views.

Here is code to check that design document was created:
BucketManager bucketManager = bucket.bucketManager();
List couchbaseDesignDocs = bucketManager.getDesignDocuments();
in my case list is not empty - all is good

After that I want to update bucket and remove DesignDocument (or documents) for that I’m trying to get all documents again
BucketManager bucketManager = bucket.bucketManager();
List couchbaseDesignDocs = bucketManager.getDesignDocuments();

and this code throws error now:
GetDesignDocumentsResponse{status=INVALID_ARGUMENTS, request=GetDesignDocumentsRequest{observable=rx.subjects.AsyncSubject@2a60640e, bucket=‘test-bucket’}}

this error thows in DefaultAsyncBucketManager in method getDesignDocuments(final boolean development)

nothing in my code was changed.

Why I’m getting this error for same code?

CouchbaseServer v.4.1-dp, java-client-2.2.2