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/09 22:00:04 UTC

incubator-ponymail git commit: get by message-id does not work

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 39132638d -> 6da8fa6d2


get by message-id does not work

This fixes #88
[This is a temporay hack - see also #162]

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

Branch: refs/heads/master
Commit: 6da8fa6d2574775ff7c81e365855e2faf50c0463
Parents: 3913263
Author: Sebb <se...@apache.org>
Authored: Wed Nov 9 21:59:48 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Wed Nov 9 21:59:48 2016 +0000

----------------------------------------------------------------------
 site/api/email.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/6da8fa6d/site/api/email.lua
----------------------------------------------------------------------
diff --git a/site/api/email.lua b/site/api/email.lua
index 1eb3679..43f980c 100644
--- a/site/api/email.lua
+++ b/site/api/email.lua
@@ -42,7 +42,7 @@ function handle(r)
     r.content_type = "application/json"
     local get = r:parseargs()
     local eid = (get.id or ""):gsub("\"", "")
-    local doc = elastic.get("mbox", eid or "hmm")
+    local _, doc = pcall(function() return elastic.get("mbox", eid or "hmm") end)
     
     -- Try searching by original source mid if not found, for backward compat
     if not doc or not doc.subject then