Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
1
-
SDK42
Description
Suggested Release Note: N/A
When user tries to use the new `CollectionManager.updateCollection` method to update a collection's `maxTTL` on server version prior to 7.6, they currently get an `HttpStatusCodeException` like this:
Exception in thread "main" com.couchbase.client.core.error.HttpStatusCodeException: Unexpected HTTP status 400 Bad Request {"completed":true,"coreId":"0xda18708d00000001","httpBody":"{\"errors\":{\"maxTTL\":\"Unsupported key\"}}","httpStatus":400,"idempotent":false,"lastDispatchedFrom":"127.0.0.1:65073","lastDispatchedTo":"127.0.0.1:8091","requestId":27,"requestType":"CoreHttpRequest","retried":0,"service":{"method":"PATCH","path":"/pools/default/buckets/foo/scopes/mySkcope/collections/zot","type":"mgmt"},"status":"INVALID_ARGS","timeoutMs":75000,"timings":{"dispatchMicros":2036,"totalDispatchMicros":2036,"totalMicros":2733}}
|
As a courtesy, we could look for the "Unsupported key" error message and convert it to a `FeatureNotAvailableException`.