Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-383

Log unexpected response codes in PersistentNode recipe

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.2.1, 2.11.1
    • 4.0.0, 2.13.0
    • Recipes
    • None

    Description

      With CURATOR-228 NoAuth response code is logged in the PersistentNode recipe if the client has no authorisation to create the node. However it can happen that the "create" permission has been given, but not "write" persmission, so further setData calls fail silently. I know this is a client error and the permissions should be fixed, but we would like to give better visibility to our users if they face this issue. Since we don't have access to the background callback within the recipe I thought logging the unexpected response code would be useful.

      This method could be called from the background callback.

      private void logUnexecpedResponseCode(int responseCode)
      {
        Code code = Code.get(responseCode);
        log.warn("Client received unexpected response code '{}' while creating/writing node on path {}', code, getActualPath());
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              _alexander Zoltan Szekeres
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: