[
https://issues.apache.org/jira/browse/CURATOR-383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jordan Zimmerman resolved CURATOR-383.
--------------------------------------
Resolution: Fixed
Fix Version/s: 2.12.1
3.3.1
> 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
> Fix For: 3.3.1, 2.12.1
>
>
> 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)