nickva opened a new pull request, #4709:
URL: https://github.com/apache/couchdb/pull/4709
Add handling for invalid field errors. Previously they would emit a 500
`badmatch` error with a stack trace:
```
% curl -v -XPOST -H'Content-type:application/json' $URL/db/_find -d
'{"selector":{"_id":{"":null}}}'
< HTTP/1.1 500 Internal Server Error
{"error":"badmatch","reason":"{error,{{mango_error,mango_util,{invalid_field_name...
```
With the fix it emits a 400 error:
```
< HTTP/1.1 400 Bad Request
{"error":"invalid_field_name","reason":"Invalid field name: _id."}
```
This should also handle a general class of mango errors from `$db/_find`
which are sent from the workers, passed through the fabric/rexi mechanism, and
handled on the coordinator side. Previously some of those would emit the same
500 badmatch + a stack trace since we didn't expect errors in a few places
which generated a `badmatch`.
ted branches
--
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]