Description
when I await cmgr.dropScope("nonexistent-scope") I’m getting a FeatureNotAvailableError instead of the expected ScopeNotFoundError
Brett Lawson says "Good catch. Definitely a bug. I think I just need to invert the operations there. Detecting the explicit not-found before the feature-not-available."
if ( |
errText.includes('not allowed on this version of cluster') || |
res.statusCode === 404 |
) {
|
throw new FeatureNotAvailableError(undefined, errCtx) |
}
|
if (errText.includes('not found') && errText.includes('scope')) { |
throw new ScopeNotFoundError(undefined, errCtx) |
}
|
The same issue applies with
await collectionMgr.dropCollection("nonexistent-collection", "example-scope"); |
Also note that https://github.com/couchbase/couchnode/blob/faa22141b3f24150190f50aab80dc46671d6a16c/test/collectionmanager.test.js seems to test for this, so may be worth double checking if it's run correctly.
Attachments
Issue Links
- blocks
-
DOC-7968 createCollection & createScope
- Resolved