You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/05/11 15:44:59 UTC

[GitHub] [couchdb] jaydoane commented on a diff in pull request #4020: Fix maybe_handle_error clauses

jaydoane commented on code in PR #4020:
URL: https://github.com/apache/couchdb/pull/4020#discussion_r870479534


##########
src/chttpd/src/chttpd.erl:
##########
@@ -1134,14 +1134,14 @@ maybe_handle_error(Error) ->
     case chttpd_plugin:handle_error(Error) of
         {_Code, _Reason, _Description} = Result ->
             Result;
+        {shutdown, Err} ->
+            exit({shutdown, Err});
         {Err, Reason} ->
             {500, couch_util:to_binary(Err), couch_util:to_binary(Reason)};
         normal ->
             exit(normal);
-        {shutdown, Err} ->
-            exit({shutdown, Err});
-        Error ->
-            {500, <<"unknown_error">>, couch_util:to_binary(Error)}
+        Error1 ->

Review Comment:
   When I see `Error1` I think maybe it's a modification of the original `Error`, but all the other case clauses use `Err`. Would that perhaps be easier to read?



-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org