summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2019-08-23 10:09:52 +0100
committerRobert Newson <rnewson@apache.org>2019-08-23 10:09:52 +0100
commit258f89e13903f34c8248041cef114c6bfd229a78 (patch)
tree575980a9bb541e548901cefdd09618fcfd436eb6
parente5baa1f30b6427b74f5afd4bc8f773fcbd497cbd (diff)
downloadcouchdb-mango-search-error-400-500.tar.gz
Send a 500, not a 400, for unknown search errorsmango-search-error-400-500
We should only send a 400 Bad Request if there is genuinely something wrong with the request, otherwise we mislead users and sysadmins.
-rw-r--r--src/mango/src/mango_error.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mango/src/mango_error.erl b/src/mango/src/mango_error.erl
index 2f22552c9..bb545ad67 100644
--- a/src/mango/src/mango_error.erl
+++ b/src/mango/src/mango_error.erl
@@ -69,7 +69,7 @@ info(mango_cursor_text, {text_search_error, {error, {bad_request, Msg}}})
};
info(mango_cursor_text, {text_search_error, {error, Error}}) ->
{
- 400,
+ 500,
<<"text_search_error">>,
fmt("~p", [Error])
};