You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2016/11/04 14:10:19 UTC

incubator-ponymail git commit: Ensure return status is checked for index and update functions

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master ca3a547ef -> c41d0f2a6


Ensure return status is checked for index and update functions

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/c41d0f2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/c41d0f2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/c41d0f2a

Branch: refs/heads/master
Commit: c41d0f2a6a74553b93dbbcfe88eae597a31cf580
Parents: ca3a547
Author: Sebb <se...@apache.org>
Authored: Fri Nov 4 14:09:54 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Fri Nov 4 14:09:54 2016 +0000

----------------------------------------------------------------------
 site/api/lib/elastic.lua | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/c41d0f2a/site/api/lib/elastic.lua
----------------------------------------------------------------------
diff --git a/site/api/lib/elastic.lua b/site/api/lib/elastic.lua
index 09a8ce8..70b70fe 100644
--- a/site/api/lib/elastic.lua
+++ b/site/api/lib/elastic.lua
@@ -153,6 +153,7 @@ function update(doctype, id, query, consistency)
         url = url .. "?write_consistency=" .. consistency
     end
     local result, hc = http.request(url, js)
+    checkReturn(hc)
     local json = JSON.decode(result)
     return json or {}, url
 end
@@ -167,6 +168,7 @@ function index(r, id, ty, body, consistency)
         url = url .. "?write_consistency=" .. consistency
     end
     local result, hc = http.request(url, body)
+    checkReturn(hc)
     local json = JSON.decode(result)
     return json or {}
 end