Github user davisp commented on the issue:

    https://github.com/apache/couchdb-couch/pull/229
  
    @iilyak For other types of errors if/when we add them I would expect the 
error to change. We're not collecting errors, the user will just get the first 
one that's found when we rereduce our output up the tree.
    
    @kxepal I like your suggestion but I'd change it slightly so that we don't 
give a key instead of the value. The reason for this is so that users see the 
value that caused the error that's being reported. Also the key is pretty much 
a lie anyway since it's not necessarily a key from the key/value and instead 
can be from a key/pointer node.
    
    Though I also see the point around confusion of providing a value there. So 
I renamed it to "error_value". 
    
    So I'd tweak it to something like:
    
    ```json
    {
        "error_value": $value_that_caused_the_error,
        "error": "builtin_reduce_error",
        "reason": "Blahbity blah blah..."
    }
    ```
    
    I'd also then go ahead and reword those error messages to not include the 
value again since we'll have it in the response.
    
    @tonysun83 For the comment about multiple reduces, that is incorrect. Even 
though you're seeing them in the code down there, the way those are exposed to 
users is through different views. And each reduce is independent. So while 
something my not be valid for _stats, it might be valid for _sum and/or a 
custom reduce function.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to