lostnet commented on issue #959: correct initial fetch() of _security to use 
credentials (#929)
URL: https://github.com/apache/couchdb-fauxton/pull/959#issuecomment-323468474
 
 
   @Antonio-Maranhao the trouble I have with ignoring the `{}` problem is that 
receivedPermissions is no longer called if we do normal throwing on the error, 
so the behavior is still wrong, but different (`isLoading` is then still true 
for example.) For some users that currently found a way to at least re-populate 
everything, the new behavior may be worse as we have now gone from wrongly 
initialized to uninitialized..
   
   What do you think about swapping the error and dispatch?:
   ```
     .then(json => {
       dispatch(receivedPermissions(json));
       if (json.error && json.reason) {
         throw new Error(json.reason);
       }
     })
   ```
    This should keep the current bug of putting the error result into the 
permissions being edited, which I find marginally safer than iterating through 
wrong behaviors..
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to