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

EventingFunctionManager GetFunctionAsync throws generic HttpRequestException on error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.3.0
    • 3.2.7
    • None
    • None
    • 1

    Description

      When attempting to use GetFunctionAsync with a function name that does not exists, I expect that an EventingFunctionNotFoundException should be thrown, but instead System.Net.Http.HttpRequestException is thrown.

      Here is the full error:

      System.Net.Http.HttpRequestException
      Response status code does not indicate success: 404 (Not Found).
         at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
         at Couchbase.Management.Eventing.EventingFunctionManager.GetFunctionAsync(String name, GetFunctionOptions options) in /Users/willbroadbelt/Documents/repos/couchbase/couchbase-net-client/src/Couchbase/Management/Eventing/EventingFunctionManager.cs:line 187
      

      I have a test that will reproduces this here: https://review.couchbase.org/c/couchbase-net-client/+/170094/1/tests/Couchbase.IntegrationTests.Management/Management/EventingFunctionManagerTests.cs#144
      (Running against 7.0).

      Attachments

        For Gerrit Dashboard: NCBC-3115
        # Subject Branch Project Status CR V

        Activity

          People

            jmorris Jeff Morris
            will.broadbelt Will Broadbelt
            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