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 2019/02/25 12:45:19 UTC

[GitHub] garrensmith commented on a change in pull request #1936: Send correct 400 for missing partition with _find

garrensmith commented on a change in pull request #1936: Send correct 400 for missing partition with _find
URL: https://github.com/apache/couchdb/pull/1936#discussion_r259807004
 
 

 ##########
 File path: src/chttpd/src/chttpd_db.erl
 ##########
 @@ -274,6 +274,11 @@ handle_partition_req(#httpd{method='GET', path_parts=[_,_,PartId]}=Req, Db) ->
             throw({bad_request, <<"database is not partitioned">>})
     end;
 
+handle_partition_req(#httpd{method='POST',
 
 Review comment:
   @iilyak that isn't quite right. What happens is a user can accidentally do a `POST /db/_partition/_find` which is missing a partition field. That post should be
   
   `POST /db/_partition/:partition_value/_find` so we need to send a correct error message which this PR does.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services