Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/81#discussion_r36315485
  
    --- Diff: src/couch_httpd.erl ---
    @@ -872,7 +872,7 @@ error_info({bad_ctype, Reason}) ->
         {415, <<"bad_content_type">>, Reason};
     error_info(requested_range_not_satisfiable) ->
         {416, <<"requested_range_not_satisfiable">>, <<"Requested range not 
satisfiable">>};
    -error_info({error, illegal_database_name, Name}) ->
    +error_info({error, {illegal_database_name, Name}}) ->
    --- End diff --
    
    I think the first option is the most sane and correct - validate function 
is only holds the knowledge about database name restrictions and throwing error 
with descriptive message  from there is correct. chttpd need just transform 
this error into HTTP response.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to