[ 
https://issues.apache.org/jira/browse/CURATOR-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15903977#comment-15903977
 ] 

ASF GitHub Bot commented on CURATOR-383:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/curator/pull/201


> Log unexpected response codes in PersistentNode recipe
> ------------------------------------------------------
>
>                 Key: CURATOR-383
>                 URL: https://issues.apache.org/jira/browse/CURATOR-383
>             Project: Apache Curator
>          Issue Type: Wish
>          Components: Recipes
>    Affects Versions: 3.2.1, 2.11.1
>            Reporter: Zoltan Szekeres
>            Priority: Trivial
>
> 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.
> {code}
> 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());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to