Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-1412

Collection Manager: Throw FeatureNotAvailable when server doesn't recognize request param

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 2.5.0
    • 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`.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            david.nault David Nault
            david.nault David Nault
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty