From 03e2da9f9a1f5e42337879c16218e434b3159391 Mon Sep 17 00:00:00 2001 From: mpl Date: Sun, 4 Sep 2011 20:30:38 +0200 Subject: [PATCH] set error status code in serveRecentPermanodes Change-Id: If7e982b1c35700823ca181e1331e404766a9ebd5 --- lib/go/camli/search/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/go/camli/search/handler.go b/lib/go/camli/search/handler.go index 62e729c72..6b580c0ee 100644 --- a/lib/go/camli/search/handler.go +++ b/lib/go/camli/search/handler.go @@ -170,6 +170,7 @@ func (sh *Handler) serveRecentPermanodes(rw http.ResponseWriter, req *http.Reque func (sh *Handler) servePermanodesWithAttr(rw http.ResponseWriter, req *http.Request) { ret := jsonMap() defer httputil.ReturnJson(rw, ret) + defer setPanicError(ret) signer := blobref.MustParse(mustGet(req, "signer")) value := mustGet(req, "value") @@ -221,8 +222,8 @@ func (sh *Handler) servePermanodesWithAttr(rw http.ResponseWriter, req *http.Req err := <-errch if err != nil { - // TODO(mpl): return error status code, in addition to the english error code ret["error"] = err.String() + ret["errorType"] = "server" return }