big-r81 commented on code in PR #5945:
URL: https://github.com/apache/couchdb/pull/5945#discussion_r4502826191


##########
share/server/loop.js:
##########
@@ -135,6 +135,10 @@ var Loop = function() {
     "rereduce" : Views.rereduce
   };
   function handleError(e) {
+    if (e == null) {
+      respond(["error", "unnamed_error", String(e)]);

Review Comment:
   You know that e is `null`, why this weird `String(e)` construction?



##########
share/server/validate.js:
##########
@@ -16,7 +16,7 @@ var Validate = {
       fun.apply(ddoc, args);
       respond(1);
     } catch (error) {
-      if (error.name && error.stack) {
+      if (error && error.name && error.stack) {

Review Comment:
   Why to check for error, it can't be `null` here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to