Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2692

Management APIs should provide detailed responses to errors (ban EnsureStatusCode)

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Resolved
    • Major
    • 3.2.6
    • 3.1.0
    • library
    • None
    • 1

    Description

      Currently, the Management APIs make extensive use of HttpResponse.EnsureStatusCode() internally. This raises an HttpRequestException with a Message that mentions the failing status code, but no other details.

      This leaves our end users with nothing to go on when investigating while their management calls failed, unless they use WireShark or Fiddler to capture the HTTP traffic.

      At the very least, if the response from the server is JSON, we should propagate that body back up to the end user in the exception.

      The RFC does not specify for or against this behavior.
      https://github.com/couchbaselabs/sdk-rfcs/blob/master/rfc/0054-sdk3-management-apis.md

      Attachments

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

        Activity

          People

            richard.ponton Richard Ponton
            richard.ponton Richard Ponton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty