This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch nouveau-invalid-field-definition-error-handling in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 5be130191dd570c18c3d43a5c1401ad689969a61 Author: Robert Newson <[email protected]> AuthorDate: Wed May 10 10:21:35 2023 +0100 handle invalid_index_fields_definition errors in nouveau --- src/mango/src/mango_error.erl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mango/src/mango_error.erl b/src/mango/src/mango_error.erl index 22cb37106..c3880385c 100644 --- a/src/mango/src/mango_error.erl +++ b/src/mango/src/mango_error.erl @@ -94,6 +94,17 @@ info(mango_cursor_nouveau, {nouveau_search_error, {error, Error}}) -> <<"nouveau_search_error">>, fmt("~p", [Error]) }; +info(mango_idx_nouveau, {invalid_index_fields_definition, Def}) -> + { + 400, + <<"invalid_index_fields_definition">>, + fmt( + "Text Index field definitions must be of the form\n" + " {\"name\": \"non-empty fieldname\", \"type\":\n" + " \"boolean,number, or string\"}. Def: ~p", + [Def] + ) + }; info(mango_fields, {invalid_fields_json, BadFields}) -> { 400,
